Send email via gmail.com - WeOnlyDo Discussion board

Send email via gmail.com (wodSmtp)

by Jeff.sajedi, Monday, December 29, 2014, 20:24 (3264 days ago)

Hi

Do you have an example how to connect and send email using smtp.gmail.com?

Send email via gmail.com

by Jasmine, Monday, December 29, 2014, 20:49 (3264 days ago) @ Jeff.sajedi

Hi Jeff.

Sending email using gmail is pretty straightforward - try something like this:

    wodSmtp1.Hostname = "smtp.gmail.com"
    wodSmtp1.Login = "your_gmail_login"
    wodSmtp1.Password = "your_gmail_password"
    wodSmtp1.Authentication = AuthLogin
    wodSmtp1.Security = SecurityImplicit
    wodSmtp1.Blocking = True
    wodSmtp1.CreateTextHtml "someone@gmail.com", "some@other.email.com", "This is a test", "", "<HTML>this is a test</HTML>"
    wodSmtp1.SendMessage

Hope this helps!
Jasmine