Use this new version if your subject or message has space or double quote 
characters.

Procedure emailAlert(subject, msg)
{
        local text;
        subject = StrReplace(subject, "\"", "\\\"");
        msg = StrReplace(msg, "\"", "\\\"");
        text = "\"" + subject + "\" \"" + msg + "\"";
        AlertIf(true, "EXEC C:\\Program Files\\AmiBroker\\EMailerSSL.exe", 
text, 5, 0);
}


--- In [email protected], Mark Hike <markh...@...> wrote:
>
> If anyone interested, I have figured this out by using undocumented feature
> :-)
> 
> Procedure emailAlert(subject, msg)
> {
>     text = subject + " " + msg;
>     AlertIf(true, "EXEC C:\\Program Files\\AmiBroker\\EMailerSSL.exe", text,
> 5, 0);
> }
> 
> emailAlert("MyOwnSubjectNow", "MyMessage\nline2\nline3");
> 
> 
> On Wed, Oct 14, 2009 at 12:25 PM, Mark Hike <markh...@...> wrote:
> 
> > I am using AlertIF() to send status emails for my auto trade system.
> > However, the subject of the emails seem to be a fixed format, like "Alert:
> > Other (5) ADP on 10/14/2009 1:00:00 PM",
> > is there a way to control the subject to make it more meaningful?
> > Not a big deal, but nice to have.
> >
> >
> >
> >
>


Reply via email to