if im correctly reading this, then you may run into issues with things like SPF records and DKIM and other anti spam technology as you're attempting to masquerade as those users. i.e. in the dns records for my domain it specifically states the machines on the internets which are allowed to send email on my behalf (using my domain) so any email you sent from your machine using my addr may be labelled as spam and your smtp gateway may be blacklisted.
prob the only way to do it reliably is to own the transaction (build an broker and facilitate the two way email - rather you than me) or cc the user and use some kind of unique token in the body of the email so if the mp doesnt hit reply all then at least you have some kind of identifier to match up your original cc address. unless im reading it wrong. On Thu, Jul 14, 2011 at 7:54 PM, simon haywood <[email protected]>wrote: > Hi, > > I am looking for some advice, and hopefully a recommendation. > > I have built a website (currently hidden on a test server) that facilitates > users emailing their MPs. I realise that there are a number of sites that > already do this - but this one is designed for a specific campaign. The site > asks users for their name, address, postcode and email. The email is > sanitised and then validated (by sending a unique code and asking for a > response) and the user's constituency is looked up using theyworkforyou's > postcode API (for which we already have agreement). We look up the MP's > email using our own database. A message is proposed, the user can edit, and > inputs are sanitised. All fairly standard stuff. > > But now I have a problem. > > My plan was to have the site email the appropriate MP setting the "from" > and "reply to" headers to be the email address of the user. In fact, it's > been working fine in this way during our test phase - using my own SMTP > server. I want to do it this way, because it means the user gets the > auto-reply, and subsequent response from the MP. > > However, it seems tricky to find an SMTP service permitting setting of the > headers in this way. > > I've tried setting the "from" to be the website domain, and the "reply-to" > to be the user. However, PHPMailer seems to put both addresses on the > reply-to line - which seems rather messy. > > So, I have two questions. > > 1. > Is my proposed method the "correct" method? If so, I'd be grateful if > someone could point me towards an SMTP service willing to play ball. There > are several services like this out there - how's it been done elsewhere? > > or. > 2. > If my proposed method is not the "correct" method, what is? > > Thanks in advance! > > Simon > > > > ______________________________**_________________ > developers-public mailing list > developers-public@lists.**mysociety.org<[email protected]> > https://secure.mysociety.org/**admin/lists/mailman/listinfo/** > developers-public<https://secure.mysociety.org/admin/lists/mailman/listinfo/developers-public> > > Unsubscribe: https://secure.mysociety.org/**admin/lists/mailman/options/** > developers-public/steev%**40initsix.co.uk<https://secure.mysociety.org/admin/lists/mailman/options/developers-public/steev%40initsix.co.uk> > -- -- Steve Power Principal Consultant Phone: +44 (0) 121 288 1667 Skype: steev_initsix Twitter: heavy_engineer Fax: +44 (0) 160 421 2871 -- www.initsix.co.uk :: Initsix Heavy Engineering Limited -- This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Initsix Heavy Engineering Limited. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Initsix Heavy Engineering Limited Registered in the UK: 5036938 Registered Address: 243 Kettering Road, Northampton, NN2 7DU, England.
_______________________________________________ developers-public mailing list [email protected] https://secure.mysociety.org/admin/lists/mailman/listinfo/developers-public Unsubscribe: https://secure.mysociety.org/admin/lists/mailman/options/developers-public/archive%40mail-archive.com
