I am writing a ruby ββscript to send email using the "mail" gem.
and my smtp settings on my local computer:
mailer_options:
address: smtp.gmail.com
port: 465
domain: gmail.com
user_name: example@gmail.com
password: example_password
authentication: :login
enable_starttls_auto: true
ssl: true
I am trying to send like this: -----
Mail.deliver do
to 'receiver@gmail.com'
from 'sender@gmail.com'
subject 'Test Mail'
text_part do
body 'Hello World!!!!!'
end
end
mail is sent successfully, but when I open the letter, I see the sender ID of the email as
example@gmail.cominstead of sender@gmail.comwhy it is so, I canβt understand.
Thanks for any comments and answers.
source
share