muquit / mailsend

A program to send mail via SMTP from command line
Other
295 stars 68 forks source link

How can i get message ID? #50

Closed rikhtehgaran closed 10 years ago

rikhtehgaran commented 10 years ago

Hi when we send an email this email on server get an ID like this: Message-ID: b4707c012f44a3f4c99ad1786dd334d6.squirrel@myserver.com

or i checked for sending email from mailsend is like this in log: Mar 10 12:03:15 server postfix/cleanup[17031]: 68353443AA: message-id=20140310083315.68353443AA@myserver

when i send email from a mail client like SquirrelMail it stored in sent folder and when i open it and show full header i see something like this: selection_699

So i wanna to know is it possible get this message id from mailsend ? when i send an email from mailsend it useble for checking the status of this message from log after send an email

Thanks

muquit commented 10 years ago

mailsend does not create Message-ID header at this time, it gets created by the SMTP server. However, if you run mailsend from your own script and if you can make your own message id, it can be supplied with -H as a custom header to mailsend. e.g. -H 'Message-ID: <message id as per RFC 2822 or 5822>'

Thanks.

rikhtehgaran commented 10 years ago

Thanks it worked