Emails aren't sending
Author: soshaughnessey
Creation Date: 3/21/2016 9:55 PM
profile picture

soshaughnessey

#1
My strategies are working well but I would now like to have a daily email from my computer on the advice from my strategy.

I have configured Wealth-Lab to use Gmail and when I test it I receive "Message Sent Successfully"
However, when the strategy runs I get a "Failure sending email" message.

My settings for Gmail setup are:
smtp.gmail.com
465
<my email address to send to> (I have tried a couple but nothing works)
User ID: my gmail address in format name@gmail.com
Login with password checked
Password entered
SSL checked

When I configure this and hit Send Test Mail, I get "Message Sent Successfully"

Any assistance from the forum would be appreciated. I searched the history and there were similar cases but I couldn't see what I was doing wrong based on those past forum questions.
profile picture

Eugene

#2
1. Is email scan in your antivirus disabled? They can interfere with SSL/email so I recommend turning it off during test.

2a. Have you made sure that "Allow less secure apps to access your account" is enabled in Gmail?

2b. Following that, would this example code work: AlertByEmail?
profile picture

soshaughnessey

#3
I think that I have turned off email scan on my antivirus but not 100% sure. Not sure how to check.

I have made sure Gmail allowed less secure apps.

I am unable to run AlertByEmail strategy. I am getting the following error: CS0246. The type or namespace name could not be found. It is referring to line 20 and EmailAlertParams

profile picture

Eugene

#4
Try changing the port to 587. At least this works for me.

Re: CS2046. You have to install Community Components and restart WLP before running this script.
profile picture

soshaughnessey

#5
I now get an error when I try to save the script. Here is my error.

Your assistance is very much appreciated. I really like WealthLab. I have always wanted it to email me when my strategy tells me to buy or sell (in case I am traveling). I hope I can get this working.


************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at WealthLabPro.ChartForm.x()
at WealthLabPro.ChartForm.set_NeedSave(Boolean value)
at WealthLabPro.Editor.j(Object A_0, EventArgs A_1)
at System.Windows.Forms.Control.OnTextChanged(EventArgs e)
at QWhale.Editor.SyntaxEdit.Notification(Object sender, EventArgs e)
at QWhale.Editor.TextSource.TextSource.Notify()
at QWhale.Editor.TextSource.TextSource.Update()
at QWhale.Editor.TextSource.TextSource.EndUpdate()
at QWhale.Editor.Selection.InsertString(String s)
at QWhale.Editor.SyntaxEdit.ProcessKeyPress(Char keyChar)
at QWhale.Editor.SyntaxEdit.OnKeyPress(KeyPressEventArgs e)
at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
at System.Windows.Forms.Control.WmKeyChar(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at QWhale.Editor.SyntaxEdit.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
profile picture

Eugene

#6
What about setting the correct SMTP port for SSL (587)?

Don't save the script. Simply Execute it and tell me the result. (I don't know how to reproduce this error anyway - I've never seen it in this context).
profile picture

soshaughnessey

#7
Yes, I am using 587. Nothing.

I have actually tried it on two different computers and it isn't working on either one.
profile picture

Eugene

#8
I've just double checked and have received all the 2 dozen emails with alerts from Auto-Email.

You didn't mention that you received a test email after pressing the "Send Test Email" button. Have you? If not, then either your email settings are entered incorrectly or the firewall/antivirus is getting in the way.
profile picture

soshaughnessey

#9
I have not received a test email after hitting the Sent Test Email button. I will try to figure out what is blocking the emails if you think it is firewall / antivirus
profile picture

Eugene

#10
Also try using a non-Gmail account to send email.
profile picture

Eugene

#11
Update to this thread:

We had a case of a "Failure sending email" half a minute after. What did not help: switch multiple providers; "allow less secure apps"; disable antivirus.

What's helped: switch Gmail SMTP port to 587.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).