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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

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


Go to End


2 Posts   1253 Views

Avatar
patitaflamenca

Community Member, 2 Posts

26 January 2012 at 4:21am

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

Community Member, 2 Posts

27 January 2012 at 7:35am

Issue solved:

After finding the article How to use Gmail as your SMTP server 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.