Send mail error which previously worked
Created at 11 Jun 2020, 04:12
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
Replies
PanagiotisCharalampous
11 Jun 2020, 12:44
( Updated at: 21 Dec 2023, 09:22 )
Hi Noppanon,
It works fine for us.
Best Regards,
Panagiotis
@PanagiotisCharalampous
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