Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I need to send mail using macro i Used below code
Sub SendGMail()
' Object creation
Set objMsg = CreateObject("CDO.Message")
Set msgConf = CreateObject("CDO.Configuration")
' Server Configuration
msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"
msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "******@gmail.com"
msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "***********"
msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = true
msgConf.Fields.Update
objMsg.To = "test@gmail.com"
objMsg.From = "test@gmail.com"
objMsg.Subject = "Test send with Gmail account"
objMsg.HTMLBody = "HTML/Plain text message."
objMsg.Sender = "Mr. Name"
Set objMsg.Configuration = msgConf
' Send
objMsg.Send
' Clear
Set objMsg = nothing
Set msgConf = nothing
End Sub
Error: The transport failed to connect to the server.
How to check smtp configuration is set in qlikview?
Hi All,
Is there a must need of Nprinting when we use macro to send email
You are creating the entire mail object on the macro, so it will work or not work regardless the setup in Qlik. For QlikView tasks, check the QMC > System > Setup > Mail Server.
For NPrinting 16 check QlikView NPrinting Server > E-mail Settings.
For NPrinting 17 check Web Console > Admin > Email Settings
Remember that as in your previous post, if 2 step verification is enabled, you will need to create an app password in the Google Account settings: https://support.google.com/accounts/answer/185833?hl=en