Use entered email as ReplyTo mail

This is a forum to suggest new features for mojoPortal. 

This thread is closed to new posts. You must sign in to post in the forums.
2/18/2011 4:04:40 AM
Gravatar
Total Posts 5

Contact form: use entered email as ReplyTo mail

Hi, there is one very useful feature I would like to see in Contact form that could be implemented quickly.

In contact form there is an option Use entered email as from address. Sometimes spoofing works well, but in most cases it's safer to leave some noreply@domain address as sender of generated message. It would be great if e-mail address entered in text box could also be copied to ReplyTo property of mail object, so that the person receiving the e-mail can simply hit reply and respond directly even if spoofing is not used.

2/18/2011 8:38:41 AM
Gravatar
Total Posts 18439

Re: Use entered email as ReplyTo mail

It already does this, but some email clients like gmail in some cases ignore the reply to and use the from address when replying.

Best,

Joe

2/18/2011 1:49:25 PM
Gravatar
Total Posts 5

Re: Use entered email as ReplyTo mail

Thanks for your reply, Joe.

I believe that this GMail bux was fixed few months ago. To confirm this, I just sent 2 test messages - Yahoo to Gmail, and Gmail to Gmail, an in both cases ReplyTo fields are shown in GMail and Thunderbird, when I hit reply it puts the e-mail from ReplyTo in To field.

Recently, I was building a asp.net contact form, and achieved the thing I'm describing.

Could there be some other reason for not having ReplyTo in mails generated by MojoPortal's contact form?

2/18/2011 4:02:09 PM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: Use entered email as ReplyTo mail

ReplyTo is definitely included in the emails sent by the Contact Form. We have dozens of forms across our sites, and it works perfectly for us. Take a look at the full headers of the incoming message and you should see the ReplyTo address was used.

3/9/2011 2:33:09 PM
Gravatar
Total Posts 5

Re: Use entered email as ReplyTo mail

Sorry, let me be more clear this time.

Yes - Reply To is included in e-mail. But...

In GMail web interface, when I receive e-mail generated by my custom code, Reply To address is copied to To field when I hit reply. However, when I receive e-mail generated by MojoPortal's contact form, when I hit reply, To field address is copied to To field.

 

In Thunderbird, Reply To works as it should in both cases. So if you use desktop client you never experience this problem, but I've enabled Catch-all address in Google Apps for domain that I administer, and now I can clearly see that people that receive e-mail from MojoPortal's form are hitting reply in GMail and are in fact sending replies to contact form's e-mail address instead of sender's e-mail. So this is a huge problem for me.

I know that this is probably some Gmail glitch, but somehow I've managed to get around it in my code, and I'm far from excellent programmer. It's the mail sending code that can be found all over the web.

Hopefully you can replicate this and fix it.

Thanks.

3/9/2011 3:37:13 PM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: Use entered email as ReplyTo mail

Well, since you're a developer and are working from source, can you take a look at Email.cs and see how your custom implementation differs? It's a bit convoluted in there, but unless you're running in full trust and have overridden Web.config to use DotNetOpenMail, it looks like the mail sending paths all end up at:

        public static bool Send(
            SmtpSettings smtpSettings,
            string from,
            string replyTo,
            string to,
            string cc,
            string bcc,
            string subject,
            string messageBody,
            bool html,
            string priority,
            string[] attachmentPaths,
            string[] attachmentNames)

Within that method, it's using delivered .NET classes for the mail (System.Net.Mail.MailMessage, sent by System.Net.Mail.SmtpClient). According to code examples I've found on the web, the ReplyTo address handling looks right to me.

The bonus is that if you can figure out what needs to change in the mojoPortal Email class to fix the issue you're seeing, then you won't have to maintain your own custom email library and can just call the mojoPortal delivered versions.

Thanks!

Jamie

3/9/2011 4:32:44 PM
Gravatar
Total Posts 5

Re: Use entered email as ReplyTo mail

Just checked and tested everything again.

I'm happy to say that it's working OK now.   :)

I checked those emails that went back to the form e-mail and based on the dates I can only conclude that problem was GoDaddy's relaying server. We finally switched hosting two days ago and form is now working OK. Currently we are using Gmail as smtp relay for the form.

You can lock this topic.

Thanks.   :)

You must sign in to post in the forums. This thread is closed to new posts.