Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8460557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:38:28+00:00 2026-06-10T13:38:28+00:00

I followed this tutorial to send emails from rails and it works just fine.

  • 0

I followed this tutorial to send emails from rails and it works just fine. But I want to improve this for my application. I don’t really want to receive emails from myself all the time, if someone were to use the contact us page. Currently I have the mail settings set as my own email and sent to my own email. My question is, is there a way to set it up such that the mail I receive from the email sent through the contact us page is the email they put in in the form?

To clarify, for example in a standard contact us page, there is the name, email, subject, body. Right now when I route the mail to myself, the :from and :to parameter are my own email, is there a way to set the :from parameter of the mail to the email specified on the page? I have tried changing mail(:subject => “[YourWebsite.tld] #{message.subject}”) to mail(:from => “#{message.from}”, :subject => “[YourWebsite.tld] #{message.subject}”) but that didn’t seem to work, I’m not really sure what to google for this specific problem because most of the contact us page tutorials I have come up with are similar to the one I already tried, which is more specific for sending mail to others instead of receiving.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T13:38:29+00:00Added an answer on June 10, 2026 at 1:38 pm

    You should not attempt to change the from field; most mail servers will not let you for obvious reasons. What you should be able to do is add a reply-to header with the email given in the address box (though often this will be bogus, esp on spam). Be very careful of course to validate your input.

    Incidentally I’d set up a separate email user for your server to send from, to avoid issues with using your own email account. So use:

    :reply_to => message.from
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I followed this tutorial to implement facebook into my application. All I want is
I followed this tutorial . But whenever I try to log in with my
I followed this tutorial and got the basics of Content Providers : http://www.vogella.de/articles/AndroidSQLite/article.html But
I followed this tutorial but still I go to the webpage refresh, then go
I followed this tutorial for uploading a file in my JSF2 application. The application
I followed this tutorial for uploading a file in my JSF2 application. The application
I followed this tutorial to connect a digit.tree to a store.JsonRest and everything works
I followed this tutorial : http://blog.mugunthkumar.com/coding/iphone-tutorial-how-to-send-in-app-sms/ and I got the alert 'Text messaging is
I've followed tutorial from passing data between classes did it, and is working fine,
i followed this tutorial (http://github.com/tupps/OpenFlow) for creating cover-flow , but in open flow openflow

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.