Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
Employee
Employee

Re: Email sending not working

Usually refers to an network error. Reyling allowed on the smtpserver? Try with IP-adress instead of DNS name. Make sure it's the correct port for the smtp server.

Please note that you are creating a CDO-object so you need to have collaboration data objects installed on the machine running the macro. I'm not 100% sure on this but I believe MS stopped shipping CDO since Outlook 2007 so you would need to manually install it.

Not applicable

Re: Email sending not working

Hi there,

I tried following script. But all the time I am getting error "ActiveX component can't create object: 'CDO.Message' ".

Can anybody please tell me URGENTLY what is going wrong ??

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") = 465
msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "user@gmail.com"
msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password"
msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = 1
msgConf.Fields.Update

' Email
objMsg.To = "user@gmail.com"
objMsg.From = "fromuser@domain.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

eliran_s
Contributor II

Email sending not working

Try this command to register the CDO ActiveX

regsvr32 "c:\windows\system32\cdosys.dll"

from a command prompt "run as administrator" (i.e. elevated).

MVP
MVP

Re: Email sending not working

Hi,

Apart from that, did you set your module security to Allow System Access?

Hope that helps.

Miguel

Not applicable

Email sending not working

Hi,

I'm trying to send email from an address in the domain of my company to an outside address (in another domain but also on address like gmail or yahoo...). I tried your solution (and many others !) but I haven't find the good solution.

(The same macro works well to send email in the same domain and from a GMail account to other address)

Does someone find the solution ?

Thank you,

Pauline

Employee
Employee

Email sending not working

I'm guessing you are running into relay problems.

Usually you can debug it by open up a telnet promp and try to send the same e-mail, you will get some more detailed error information.

By default you aren't allow to relay e-mails of your exchange smtp server to outside domains so this is likely something you need to turn on.

Not applicable

Email sending not working

The code works perfectly. However, it is using schema.microsoft .... where my scenario is, the server has blocked internet access, besides sending the mail to exchange server (within the same domain). Is there any reference on macro, for sending mail using SMTP to exchange server? I have tested the SMTP mail through QMC, it works though.

Not applicable

Re: Email sending not working

I sent from gmail domain to hotmail domain.

It's working!!

Thank you for your code!!!!

Not applicable

Re: Email sending not working

hello everyone...Code is working fine....But when we are sending to users from domains......how do we know there passwords....

Not applicable

Re: Email sending not working

I'm having some of the same issues.. Can someone please attach a .qvw example that I can open to see how to set this up? Thanks in advance.

Community Browser