Send mail error which previously worked

Created at 11 Jun 2020, 04:12
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
NO

noppanon

Joined 17.05.2017

Send mail error which previously worked
11 Jun 2020, 04:12


Hi there,

   Last month I have a bot which was able to send email to gmail. It worked perfectly. Yes, I had to run some configuration. However now same code does not work.

here is the code sample. 

using System;
using System.Linq;
using System.Collections.Generic;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;

namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]
    public class Color : Robot
    {
        [Parameter("Periods ", DefaultValue = 0.0)]
        public int Periods { get; set; }

        bool Done;
        protected override void OnStart()
        {
            Done = false;
        }

        protected override void OnTick()
        {
            if(!Done)
            {
                Print("Send email");
                Notifications.SendEmail("mymail@gmail.com", "mymail@gmail.com", "from ctrader test", "mail body");
                Done = true;
            }
        }

        protected override void OnStop()
        {
            // Put your deinitialization logic here
        }
    }
}

here is error I have. 

Anything wrong with my code?

 

Thanks in advance

Noppanon

 

 


@noppanon
Replies

PanagiotisCharalampous
11 Jun 2020, 08:49

Hi Noppanon,

You need to check your email configuration in case something changed.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

noppanon
11 Jun 2020, 09:34

Hi Panagiotis, 

   Thank you for taking this topic. I confirmed that there is no change at all on either previuse code and mail setting. May you try on your side?

 

Regards

Noppanon


@noppanon

noppanon
11 Jun 2020, 11:33

Hi,

   Updated. I had run MT4 EA to send mail to my gmail account. it run perfectly fine. My gmail got mail from MT4. So I don't it is gmail setting problem. 

regards,

 

Noppanon


@noppanon

PanagiotisCharalampous
11 Jun 2020, 12:44 ( Updated at: 21 Dec 2023, 09:22 )

Hi Noppanon,

It works fine for us.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous