Mail Format  [SOLVED]

Questions about MultiCharts and user contributed studies.
no erocla
Posts: 134
Joined: 31 May 2013
Has thanked: 60 times
Been thanked: 7 times

Mail Format  [SOLVED]

Postby no erocla » 29 Jan 2016

Hi guys,

anyone know if there's a way to change and customize Alert Mail format ?

Regards
No Erocla

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Mail Format

Postby TJ » 29 Jan 2016

Hi guys,

anyone know if there's a way to change and customize Alert Mail format ?

Regards
No Erocla
Please give a bit more detail on what you want to do?

no erocla
Posts: 134
Joined: 31 May 2013
Has thanked: 60 times
Been thanked: 7 times

Re: Mail Format

Postby no erocla » 29 Jan 2016

Thank you for reply tj.

if you write in Signal: Alert("HELLO");

you will receive this mail format:

29.01.2016 14:00:05
Source: System
Instrument: ESTX50
Resolution: 1 Hour
Price: 3'004.94
Message: HELLO

i would like to customize it deleting first 4 lines.

I would like to find a way to start new line too, for example:

Message: HELLO
I'AM
NO EROCLA

Hope to be more clear.
Thank you again

Regards
No erocla

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Mail Format

Postby TJ » 29 Jan 2016

The information in the first 4 lines are important... you won't know the value until you have multiple indicators blasting at you.


To add a new line, use either of the following:


NEWLINE

\n

no erocla
Posts: 134
Joined: 31 May 2013
Has thanked: 60 times
Been thanked: 7 times

Re: Mail Format

Postby no erocla » 29 Jan 2016

Thank you a lot for response.

I'm not interested in this 4 lines, do you know if there s a way to delete them ?

Best regards
No Erocla

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Mail Format

Postby JoshM » 30 Jan 2016

I'm not interested in this 4 lines, do you know if there s a way to delete them ?
Nope. You'll need to use a DLL if you want to create custom email messages.

jaanie
Posts: 4
Joined: 13 Sep 2013
Location: The Netherlands
Has thanked: 1 time
Been thanked: 1 time

Re: Mail Format

Postby jaanie » 30 Jan 2016

Hello no erocla,

I just found this other approach on StackOverflow, it might work. I haven't tried it yet though.
then you don't have to use Alerts.

http://stackoverflow.com/questions/1028 ... ail-vb-net

jaanie

Code: Select all

using System.Net.Mail;
using System.Text;

public MailMessage mail;

{
sb = new StringBuilder();
sb.AppendLine("price ");
sb.Insert(1, StrategyInfo.AvgEntryPrice);
MailMessage mail = new MailMessage("my_mailaddress@gmail.com", "my_mailaddress@gmail.com");
SmtpClient mailclient = new SmtpClient();
mailclient.Port = 465;

mailclient.DeliveryMethod = SmtpDeliveryMethod.Network;
mailclient.UseDefaultCredentials = false;
mailclient.Host = "smtp.gmail.com";
mailclient.EnableSsl = true;
mailclient.Timeout = 10000;
mail.Subject = "bought some shares";
mail.Body = sb.ToString();
mailclient.Credentials = new System.Net.NetworkCredential("my_mailaddress@gmail.com","password");
mailclient.Send(mail);
}

no erocla
Posts: 134
Joined: 31 May 2013
Has thanked: 60 times
Been thanked: 7 times

Re: Mail Format

Postby no erocla » 31 Jan 2016

Thank you for help jaanie,

but how can i use this with multicharts ?

Regards
No Erocla

jaanie
Posts: 4
Joined: 13 Sep 2013
Location: The Netherlands
Has thanked: 1 time
Been thanked: 1 time

Re: Mail Format

Postby jaanie » 31 Jan 2016

Hello No Erocla

I did not realize you are using the standard MC version. The solution i gave is only useful in MC.Net.
I am sorry. I guess JoshM is right. You will probably have to make a dll.

Best of luck,
jaanie

no erocla
Posts: 134
Joined: 31 May 2013
Has thanked: 60 times
Been thanked: 7 times

Re: Mail Format

Postby no erocla » 01 Jun 2017

Any news regarding the possibility to change email format ?

Best regards
No Erocla


Return to “MultiCharts”