send two emails with different body text

Montanaman

New member
Joined
Sep 25, 2007
Messages
4
Programming Experience
Beginner
I have a form that I want to send out two different emails from. Here is the basic code as I have it today. It sends 2 emails just fine, the problem is that it sends the same message (sbody). I can't get it to send sbody2.What would I have to change to make this work? Anyone?

Dim sbody As String
Dim sbody2 As String

sbody = "Text goes here.<br><br>"
sbody += "Date: " & Me.appdate.Value & "<br>"
sbody += Me.schoolmail.Value & "<br><br>"
sbody = "<html><head></head><body>" & sbody & " </body></html>"

sbody2 = "Text 2 goes here.<br><br>"
sbody2 += "Date: " & Me.appdate.Value & "<br>"
sbody2 += Me.schoolmail.Value & "<br><br>"
sbody2 = "<html><head></head><body>" & sbody & " </body></html>"

SQLMail.Send(schoolmail.Value, "toEmail", "Text Subject", sbody, True)
SQLMail.Send("From", schoolmail.Value, "Text Subject 2", sbody2, True)
 
Dim sbody As String
Dim sbody2 As String

sbody = "Text goes here.<br><br>"
sbody += "Date: " & Me.appdate.Value & "<br>"
sbody += Me.schoolmail.Value & "<br><br>"
sbody = "<html><head></head><body>" & sbody & " </body></html>"

sbody2 = "Text 2 goes here.<br><br>"
sbody2 += "Date: " & Me.appdate.Value & "<br>"
sbody2 += Me.schoolmail.Value & "<br><br>"
sbody2 = "<html><head></head><body>" & sbody2 & " </body></html>"

SQLMail.Send(schoolmail.Value, "toEmail", "Text Subject", sbody, True)
SQLMail.Send("From", schoolmail.Value, "Text Subject 2", sbody2, True)



you in this part sbody2 = "<html><head></head><body>" & sbody & " </body></html>"

" & sbody2 & " not " & sbody & "
 
Back
Top