SMTP settings for private domains

Get help with using AutoHotkey and its commands and hotkeys
labrint
Posts: 135
Joined: 14 Jun 2017, 05:06

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”

Who is online

Users browsing this forum: AHKStudent, Bing [Bot], boiler, loek6000 and 242 guests