All,
I see that after sending an email message using SMTPSendMail, there is an X-Priority: 3 line in the header of the received message. Is there any way of setting the priority of the outgoing email?
Thanks for any help,
Dick
SMTPSendMail Priority
Moderators: JRL, Dorian (MJT support)
I have found an answer that seems to work for me at this moment. If I add a %CRLF% to the "Subject" line of the SMTPSendMail function I can then add information to the header. I have found that some things will be overwritten by the real header information. For example if I try to use "X-Priority" the real header information will overwrite whatever I put into my "X-Priority" line. However, I am using Pegasus Mail for my regular email and Pegasus will accept a simple "Priority" rather than "X-Priority". "Priority" does not get overwritten and the email sent by Macro Scheduler and received by Pegasus Mail will be classified as urgent. This said, the following works for me:
Everything in blue is generic and would have to be changed to your particular email name and SMTP server settings if you wanted to try this.
Let>recip=[email protected]
Let>server=mail.myserver.com
Let>from=[email protected]
Let>name=Header Test
Let>subject=Priority Test%CRLF%Priority: urgent%CRLF%
Let>bod=This is a test.
SMTPSendMail>recip,server,from,name,subject,bod,
The header of this email will look like this:
Return-Path:
Received: from user (name.myserver.com [192.168.0.0])
by mail.myserver.com (8.9.3/8.9.2) with ESMTP id KAA24664
for ; Tue, 29 Nov 2005 10:20:29 -0600
Message-Id:
From: "Header Test"
Subject: Priority Test
Priority: urgent
To: [email protected]
Reply-To: [email protected]
Date: Tue, 29 Nov 2005 09:17:27 -0600
X-Priority: 3
X-Library: Indy 9.00.10
X-PMFLAGS: 37748864 0 1 P5AFHOPN.CNM
Support,
Will this trick continue to work in the future?
Thank you,
Dick
Everything in blue is generic and would have to be changed to your particular email name and SMTP server settings if you wanted to try this.
Let>recip=[email protected]
Let>server=mail.myserver.com
Let>from=[email protected]
Let>name=Header Test
Let>subject=Priority Test%CRLF%Priority: urgent%CRLF%
Let>bod=This is a test.
SMTPSendMail>recip,server,from,name,subject,bod,
The header of this email will look like this:
Return-Path:
Received: from user (name.myserver.com [192.168.0.0])
by mail.myserver.com (8.9.3/8.9.2) with ESMTP id KAA24664
for ; Tue, 29 Nov 2005 10:20:29 -0600
Message-Id:
From: "Header Test"
Subject: Priority Test
Priority: urgent
To: [email protected]
Reply-To: [email protected]
Date: Tue, 29 Nov 2005 09:17:27 -0600
X-Priority: 3
X-Library: Indy 9.00.10
X-PMFLAGS: 37748864 0 1 P5AFHOPN.CNM
Support,
Will this trick continue to work in the future?
Thank you,
Dick
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Yes, should do. That's the right way to add headers. Another way to send email is detailed here:
http://www.mjtnet.com/forum/viewtopic.php?t=1663
http://www.mjtnet.com/forum/viewtopic.php?t=1663
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?