API Command File not reading message - Urgent

Discussion for developers using MailEnable.
Post Reply
tuvia
Posts: 14
Joined: Tue Nov 17, 2009 5:59 am

API Command File not reading message - Urgent

Post by tuvia »

I have placed into the smtp queue a message body file and a command file, exactly as specified in the Mailenable api.pdf. It goes haywire. Here is what I did and what happens:

What I did:
- put message file into x:\xxxx\smtp\outgoing\messages.
- message file is named correctly and consists of 3 lines of text:
password reminder
your password is blah
thank you
- then put command file into x:\cccc\smtp\outgoing. Command file looks like this:
DomainName=domain.com
CommandType=NORMAL
Recipients=[SMTP:" + lcRecipient + "]
Sender=[SMTP:OnlineRegistration@esfmarks.com]
Retries=0
TimeAcquired=" + lcTime
NextSendTime=" + lcTime
MessageID=" + lcGUID + ".MAI"
Priority=Normal
Status=UnSent
Subject=" + lcSubject
WHAT HAPPENS:
1. MESSAGE IS SENT TO CORRECT RECIPIENT
2. BODY OF MESSAGE IS BLANK
3. FROM AND SUBJECT ARE BLANK (REPLY-TO IS CORRECT BASED ON SENDER PARAM ABOVE)
4. IN THE HEADERS ARE 3 EXTRA HEADER LINES TAKEN FROM THE BODY EMAIL TEXT, A HEADER THAT IS CALLED PASSWORD REMINDER, ONE YOUR PASSWORD IS, AND ONE THANK YOU. IOW THE BODY MESSAGE IS BEING PARSED AND INSERTED INTO THE HEADER, LEAVING THE BODY BLANK, AND NO FROM OR SUBJECT.

Help!!!!!!

TIA

MailEnable
Site Admin
Posts: 4441
Joined: Tue Jun 25, 2002 3:03 am
Location: Melbourne, Victoria Australia

Re: API Command File not reading message - Urgent

Post by MailEnable »

You need write out the message file like this:

Code: Select all

From: "WhoEver" <whoever@domain.com>
To: "WhoEver" <whoever@domain.com>
Subject: Password Reminder

password reminder
your password is blah
thank you
Specifically, you need the From and Subject qualifiers and a blank CRLF line to appear before your text.
Regards, Andrew

tuvia
Posts: 14
Joined: Tue Nov 17, 2009 5:59 am

Re: API Command File not reading message - Urgent

Post by tuvia »

Many thanks. I had thought of adding the headers and tried it, but I had not added the blank line between the headers and the body.

Post Reply