Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

UserForms with SMTPMailer - problem with reply-to [SOLVED]


Reply

2 Posts   586 Views

Avatar
patitaflamenca

26 January 2012 at 4:21am Community Member, 2 Posts

Hi there, I'm new to Silverstripe and hope someone can help me:

I'm running Silverstripe locally using a WAMP server and therefore installed the smtpmailer module in order to send mails via my gmail account.
I created a contact page using the userforms module.

I'm trying to achieve the following:
A user submits the form, entering "name", "Your Email" and "message"
An email is sent to the site administrator. When replying to the email I'd like the user's email (from the "Your Email" field) to appear in the To field.

I've set up the contact form to use the "Your Email" field from the form as the "From" field.

There is no problem submitting the form and emails arrive fine. The problem is that the emails received have my gmail address (the one set up for "SMTP server username" in the smtpmailer settings) in the "From" field so when replying to the email I need to copy the user's email into the To field. Not ideal when emails are sent to other people who tend to overlook this.

Any ideas are appreciated. Thanks

Avatar
patitaflamenca

27 January 2012 at 7:35am Community Member, 2 Posts

Issue solved:

After finding the article [url=http://lifehacker.com/111166/how-to-use-gmail-as-your-smtp-server]How to use Gmail as your SMTP server[/url] I changed my SMTPMailer settings to use the details of one of my websites (define('SMTPMAILER_SMTP_SERVER_ADDRESS', 'mail.mydomain.com'); etc.) and everything works perfectly.

So the issue was Gmail related and had nothing to do with either Userforms or SMTPMailer.