|
MailListBot Examples - Message Personalization
|
This example demonstrates the sending of a personalized email
message using an MS Access database.
- Create the MailListBot object:
Dim oMailListBot
Set oMailListBot = Server.CreateObject ("ExclamationSoft.MailListBot.3")
If oMailListBot Is Nothing Then
Response.Write "Could not create MailListBot object"
Set oMailListBot = Nothing
Exit Function
End If
- Required Properties:
oMailListBot.SetTo = "email@domain.com"
oMailListBot.SetFrom = "email@domain.com"
oMailListBot.SetServer = "smtp.domain.com"
- Turn on personalization:
oMailListBot.SetPersonalization = TRUE
- Database Properties:
oMailListBot.SetDsn = "Driver={Microsoft Access Driver (*.mdb)};"&_
"DBQ=C:\data\MailListBot.mdb;"
oMailListBot.SetDBTable = "Customer"
oMailListBot.SetDBEmailColumn = "email"
oMailListBot.SetDBReplacementIds = _
"<<first_name>>=first_name,<<last_name>>=last_name,<<email>>=email"
- Send the email message:
If oMailListBot.Send = false Then
Response.Write "Failed to send message"
Response.Write "Error message:["&oMailListBot.GetErrorMsg&"]"
Set oMailListBot = Nothing
Exit Function
End If
Set oMailListBot = Nothing
|
Have a suggestion for our documentation? Let us know: support@MailListBot.com. We're here to help. |