Any Examples Sending Email Out?

I have these exact settings. The only thing I can see different is I define a SMTPSecureSocket on a module and then I use in a method in the same module. Other than that, I have the exact settings you have here. I even tried signing up for a new gmail account so that I wasn’t using my old google account which was a child of a admin parent google account. Even with the new gmail account, 2fa turned on and setting up and plugging in the new app password, it is still not working.

I’ve had timeout issues in the past sending emails through gmail. If your app crashes while sending an email it is lost. I set up a mail server that authenticates with gmail. I use the SMTPSecureSocket to send to mail server running on a VM and then that sends it to gmail. This way if your app crashes or gmail fails to send then the email will eventually be sent out. I havent lost any emails since doing it this way

“here’s one I made earlier”

I had lots of issues getting the email to work (and then stopping) as at the time the xojo documentation was wrong and I was trying lots of different email providers so ended up with my own ‘email tester’ app

The attached file works with gmail and very basic with no error checking (built in 4.1) only ever intended for my own use but it may help to verify the gmail settings.

Email Tester Project

I could not get it to work using Port 465. Try Port 587.

I use CURLEmailMBS for years now, in conjunction with mailgun.com as smtp mailer.

Mailgun recently has hidden its free plan (1000 transactional emails per month) and offers a trial plan.

One needs to book the trial first and then downgrade to free (flex) plan, otherwise one will automatically be upgraded to a paid plan after trial expires.

Sendinblue is a valid smtp mailer alternative with a free plan for up to 300 emails per day.

One can get smtp credentials or an API key to send transactional emails.

If one wishes to send emails from ones own domain name, mailgun and sendinblue provide DNS records which one can add in ones own DNS zone management (SPF, DKIM, etc)

Sending mails through ones own standard email account or through gmail etc may fail for various reasons. Sending rate limitations is just one of them.

1 Like

Thank you for the help everyone! I finally was able to get mail to work again. The problem was on my old account. Thanks again for the help.

Can you please post the link to your project again?

I’m using MailSocket to send receipts and occasionally it goes crazy and sends acres of gibberish instead of the PDF.

Thanks
Robin

Unfortunately I no longer have the project. I left it up for awhile and then I deleted it. Im sorry.