login about faq

Hi,

I'm using the smtp component to send out emails both via smtp relays and also directly via mxlookup. The latter is only used in those cases where the server is on a fixed ip and it's own MX records point to that IP so spam filters aren't an issue. We have one problem when sending out directly (mxlookup): If there are two or more recipients in the email we send the email to each of the recipient mx servers by modifying the mailman.SmtpHost property in turn. But when we call SendEmail the target smtp server gets ALL the recipients of the email as the RCPT TO: Envelope recipients and of course rejects those addresses that aren't in the domain of that server. Q: Is there a way to send an email to a specific recipient only WITHOUT modifying the TO:, CC:, etc. mail headers? We need to preserve the headers as they are with all the recipients in.

asked Jan 07 '13 at 06:08

clausc's gravatar image

clausc
1345


Call the SendMime method instead of SendEmail. The SendMime method allows you to pass the MIME in one argument, and the "RCPT TO" addresses in another argument.

Also, the mailman.SendEmail method is equivalent to the following (pseudo-code)

mimeStr = mailman.RenderToMime(emailObject);
success = mailman.SendMime(fromAddr, recipients, mimeStr);

link

answered Jan 07 '13 at 08:42

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×184
×80

Asked: Jan 07 '13 at 06:08

Seen: 1,082 times

Last updated: Jan 07 '13 at 08:42

powered by OSQA