SMTP settings for private domains

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
labrint
Posts: 379
Joined: 14 Jun 2017, 05:06
Location: Malta

SMTP settings for private domains

18 Nov 2019, 04:46

Hi, I have been using the following code to send emails via SMTP from gmail accounts. How get/change the settings to cater for custom domains/email addresses?

Code: Select all

pmsg := ComObjCreate("CDO.Message")
pmsg.From := """John Agius"" <[email protected]>"
pmsg.To := "[email protected]"
pmsg.BCC := ""
pmsg.CC := ""
pmsg.Subject := "Message / Note"
pmsg.TextBody :=emailtosomeone
fields := Object()
fields.smtpserver := "smtp.gmail.com" ; specify your SMTP server
fields.smtpserverport := 465 ; 25
fields.smtpusessl := True ; False
fields.sendusing := 2 ; cdoSendUsingPort
fields.smtpauthenticate := 1 ; cdoBasic
fields.sendusername := "[email protected]"
fields.sendpassword := "password"
fields.smtpconnectiontimeout := 60
schema := "http://schemas.microsoft.com/cdo/configuration/"
pfld := pmsg.Configuration.Fields
For field,value in fields
pfld.Item(schema . field) := value
pfld.Update()
pmsg.Send()

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 321 guests