Please help me with this issue, im new in Macro. I got this codes https://www.youtube.com/watch?v=sIQLedQPrPs






Sub SendEmail(what_address As String, subject_line As String, mail_body As String)
'
' SendEmail Macro
'

'
Dim olApp As Outlook.Application
Set olApp = CreateObject("Outlook.Application")

Dim olMail As Outlook.MailItem
Set olMail = olApp.CreateItem(olMailItem)

olMail.To = what_address
olMail.Subjeect = subject_line
olMail.Body = mail_body
olMail.Send



End Sub
Sub SendMassEmail()

row_number = 1

Do
DoEvents
row_number = row_number + 1
Dim mail_body_message As String
Dim ip_address As String

mail_body_message = Sheet1.Range("J2")
ip_address = Sheet1.Range("D" & row_number)
mail_body_message = Replace(mail_body_message, "ip_address", ip_address)
MsgBox mail_body_message

Call SendEmail(Sheet1.Range("A" & row_number), "This is a test e-mail", Sheet1.Range("J2"))
Loop Until row_number = 6


End Sub