L email_send_gmail(C gmail_email_address, C gmail_email_password, C to, C from, C subject, C html_body, C text_body [, C cc [, C bcc [, C attachments ]]])
The gmail account.
The password for the gmail account
The recipient's e-mail address. This can be a comma delimited list of addresses.
The sender's e-mail address. If the from parameter is blank (i.e. ""), the gmail_email_address will be used.
The message subject
The message in HTML format. Leave blank to specify the message as plain text using the text_body argument.
The message in plaintext format. If the html_body property is blank, the text_body will be used instead.
A comma delimited list of addresses to "CC".
A comma delimited list of address to "BCC".
A comma delimited list of attachments.
Returns .T. if operations succeeds. Otherwise .F.
Send email using the Gmail SMTP server.
The email_send_gmail() function sends an email using Gmail's SMTP server. The Gmail account MUST be configured to use 2 factor authentication and the password MUST be a generated password that you have generated for the Gmail account. For example:
dim gmail_email_address as c = "[email protected]" dim gmail_email_password as c = "my gmail email password" dim from as c = "[email protected]" dim to as c = "[email protected]" dim subject as c = "Demo follow-up" dim html_body as c =<<%html% Hello Ms. Meadow, <br><br> Thank you for taking the time to evaluate Product Co! Did you have any questions about yesterday's demo? I am here to answer <em>any</em> questions you may have. I look forward to hearing from you! <br><br> Sincerely,<br> Jane Doe<br> <strong>Product Co - <em>We have your solutions!</em></strong> %html% dim text_body as c = "" dim cc as c = "" dim bcc as c = "" dim attachments as c = "C:\logos\productCoLogo.png" dim result as l result = email_send_gmail(gmail_email_address,gmail_email_password,to,from,subject,html_body,text_body,cc,bcc,attachments)