well the code i use is below
I’ve not tried your class. if i cant get this working i will give it a go, but i’m hoping its just a missing header or something easy!
[code] Dim mail as EmailMessage
Dim file as EmailAttachment
Dim i as Integer
Dim s as String
mail = New EmailMessage
mail.fromAddress=fromaddress
mail.subject=subject
if bodyashtml then
mail.bodyHTML = body
else
mail.bodyPlainText =body
end if
mail.Headers.AppendHeader “Content-Type”, “text/plain; charset=UTF-8;”
mail.headers.appendHeader “X-Mailer”,“Email Message”
mail.headers.appendHeader “X-Comment”,str(msgid)
if Receipt then
mail.headers.AppendHeader “Disposition-Notification-To”,fromaddress //read receipt
end if
if replyto <> “” then
mail.headers.AppendHeader “Reply-To”, ReplyTo // different reply to address.
end if
s = toaddress
//multiple To addresses separated by commas or semi colons
s = s.ReplaceAll(";",Chr(13))
s = s.ReplaceAll(",",Chr(13))
For i = 1 to CountFields(s,Chr(13))
mail.addRecipient Trim(NthField(s,Chr(13),i))
next
//multiple CC addresses separated by commas or semi colons
s = ccto
s = s.ReplaceAll(";",Chr(13))
s = s.ReplaceAll(",",Chr(13))
For i = 1 to CountFields(s,Chr(13))
mail.addCCRecipient Trim(NthField(s,Chr(13),i))
next
//add attachments, if any
If Attach <> “” then //is there a path to an attachment file?
file = New EmailAttachment
file.MIMEType = “application/pdf”
file.loadFromFile GetFolderItem(Attach.trim)
mail.attachments.append file //add file to attachments array
end
//send the mail
SMTP.messages.append mail //add email to list of messages
SMTP.SendMail //send message[/code]