# To choose from multiple email address while sending mail

**URL:** <https://www.ruby-forum.com/t/to-choose-from-multiple-email-address-while-sending-mail/141748>\
**Category:** Rails\
**Created:** [June 30, 2008, 10:54am UTC](https://www.ruby-forum.com/t/to-choose-from-multiple-email-address-while-sending-mail/141748 "2008-06-30T10:54:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ankit2584](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/51bf81/32.png) [@ankit2584](https://www.ruby-forum.com/u/ankit2584)\
**Post date:** [June 30, 2008, 10:54am UTC](https://www.ruby-forum.com/t/to-choose-from-multiple-email-address-while-sending-mail/141748/1 "2008-06-30T10:54:16Z")

</div>

Hi,  
I want the user to have the facility to choose from which of his email  
address he wants to send the mail.

example a user may wish to send mail from removed\_email\_address@domain.invalid or  
removed\_email\_address@domain.invalid or from some other email address.  
How do i configure action mailer seetings to handle this.  
MY current actionmailer settings as follows allow me to send mail only  
from one email address.

config.action\_mailer.raise\_delivery\_errors = true

#set delivery method to :smtp, :sendmail or :test  
config.action\_mailer.delivery\_method = :smtp

#these options are only needed if you choose smtp delivery  
config.action\_mailer.smtp\_settings = {  
:address =\> “removed\_email\_address@domain.invalid”,  
#:domain =\>‘[netsolmail.net](http://netsolmail.net)’,  
:port =\> 25,  
:authentication =\> :login,  
:user\_name =\> Username goes here,  
:password =\> password goes here

}

Please help

And Also i believe for sending email through gmail tls is required. So  
how should i go about it also.

Thank you
