Script problem

This forum is for discussing Mailtraq's Scripting features. Get help with Mailtraq scripts, templates and external ActiveX scripting.

Script problem

Postby armindo.gameiro » Fri Sep 08th, 2006 11:40am

Hi,

I am doing one script to put a header and one footer to all emails that are sent by our server.

It was working well until I find that it does't work if I send an attachment.

My script is the following:

SelectOutMessage();
sender2 := Header("From");
email := AddressOf(sender2);

If(WildCardMatch(email, "*@our1stdomainname.*"),
Do(
MsgInsertLine(1,"First line of the header.");
MsgInsertLine(2,"Second line of the footer:");
MsgInsertLine(3,"\nPlease also read the end of this email.");
MsgInsertLine(4,"~~~~~~~~~~~~\n");

MsgAddLine("First line of the footer.");
MsgAddLine("Second line of the footer.");
MsgAddLine("Third line of the footer.");
MsgAddLine("Fouth line of the footer.");
MsgAddLine("Fifth line of the footer.");

)
)

I hope you can help me to resolve this problem.

Thank you.
Armindo
armindo.gameiro
 
Posts: 1
Joined: Fri Sep 08th, 2006 11:10am

Re: Script problem

Postby Martin Clayton » Fri Sep 15th, 2006 3:36pm

Hi Armindo,
armindo.gameiro wrote:Hi,

I am doing one script to put a header and one footer to all emails that are sent by our server.

It was working well until I find that it does't work if I send an attachment.

My script is the following:

SelectOutMessage() is only needed in templates and all but the final statement within the Do() block shoud be terminated with "," not ";" -- so it might look like this:
Code: Select all
sender2 := Header("From");
email := AddressOf(sender2);

If(WildCardMatch(email, "*@our1stdomainname.*"),
  Do(
    MsgInsertLine(1,"First line of the header."),
    MsgInsertLine(2,"Second line of the footer:"),
    MsgInsertLine(3,"\nPlease also read the end of this email."),
    MsgInsertLine(4,"~~~~~~~~~~~~\n"),
    MsgAddLine("First line of the footer."),
    MsgAddLine("Second line of the footer."),
    MsgAddLine("Third line of the footer."),
    MsgAddLine("Fouth line of the footer."),
    MsgAddLine("Fifth line of the footer.")
  )
)


I expect the MIME handling would be hard work by script. Have you tried the built-in Options, Footers and Disclaimers functionality?

Cheers, Martin
User avatar
Martin Clayton
Expert User
 
Posts: 529
Joined: Sat Jan 15th, 2005 8:20am
Location: London, UK


Return to Mailtraq Scripting

Who is online

Users browsing this forum: No registered users and 1 guest

cron