Test Mailer

Hy…

I want to send an email silently using this code,

[code] dim mail as EmailMessage
MailSocket.Address = “smtp.gmail.com
MailSocket.Port = 25
MailSocket.Username = “rivo@gmail.com
MailSocket.Password = “****”

mail = new EmailMessage
mail.subject = “testing email”
mail.bodyPlainText = TextArea1.Text
mail.headers.appendHeader “Test Mailer”,“DEMO”

mail.AddRecipient trim(“email1@gmail.com;email2@gmail.com”)

MailSocket.Messages.Append mail
MailSocket.SendMail[/code]

If the recipent is only one email add is working, but if it more, its not working.
As I do normally in outlook email client, I can easily separated by “;” sign to let other email address to be added.

Any help.? I want to send multi email in a atime.

thanks

Regards,
Rivo

I do not think a semicolon works as a separator for multiple recipients.

You need to call Mail.AddRecipient for each recipient seperately.

thanks… its worked now…
what about attaching the file, is it possible to do by using this socket control.?

thanks

Regards,
Rivo

Yes its possible. Look for emailAttachment and do it like this .Attachments.Append

thanks…
its working, but how do I know if the email is sent or not, because there is no indicator or progress bar telling about the process.

regards,
Rivo

You’ll need to implement the various event handlers for SMTPSocket to track send progress:

https://documentation.xojo.com/index.php/SMTPSocket

[quote=30955:@Paul Lefebvre]You’ll need to implement the various event handlers for SMTPSocket to track send progress:

https://documentation.xojo.com/index.php/SMTPSocket[/quote]

Hi Paul,

Xojo inc. Still haven’t fixed the issue when you use above link. Page still not shown completely with https.

Link with http: http://documentation.xojo.com/index.php/SMTPSocket