Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am trying this macro to send simple test email. I am getting error at line indicated with Green text.
SMTP server details working when I configured automatic email(Alert Wizard)
Please help. Its Urgent
Thank you
CODE:
function SendTestMail()
Set objMsg = CreateObject("CDO.Message")
Set msgConf =objMsg.Configuration
'Server Configuration
msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "203.199.60.61"
msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic
msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "shweta.sawant@lntebg.com" 'type your mail id
msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "*******" 'Type your acccount Password
msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = 1
'Connection Timeout in seconds (the maximum time CDO will try to establish a connection to the SMTP server)
msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
msgConf.Fields.Update
'End With
objMsg.To = "shweta.sawant@lntebg.com" ' type to mail id
objMsg.From = "TechCenter@lntebg.com" 'type from mail id
objMsg.Subject = "Test mail"
objMsg.HTMLBody = "QlikView Test Mail"
'objMsg.AddAttachment "D:\Image.jpg"
'Msg.AddAttachment filepath ' Attachement object
objMsg.Sender = "L&T"
Set objMsg.Configuration = msgConf
Set objFlds = Nothing
Set objConf = Nothing
Set objEmail = Nothing
Msgbox "Email Sent Successfully"
End function
Hope this helps you.
Vikas
Hey Vikas,
Thanks for help. But I am using Qlikview 11 personal edition.
You need to check the same I don't have IDEA whether the same will work in PE.
Vikas