Sending Email via ActionMailer::Base using SMTP, but sender should be another email-adress - ruby-on-rails

i'm searching for a way to send emails with ruby on rails via actionMailer. The difficulty is, that i am sending the emails via gmail smtp. But i have to send them from different email-adresses (the customers have to be able to setup there own email adress, but i dont want to save the credentials).
Any Idea?
Thanks"!

you have to setup a mail server to send your mails for you and you just send the mail with the headers saying that it is from the person's email address. there are many mail servers, sendmail being one of the standards for a VPS. if you pick a service like heroku, they have mailing as an addon: http://addons.heroku.com/sendgrid

Related

Bamboo Mailer & SES Failing to send an email to one specific user

I am working on a production server that sends roughly 1000 emails a day with almost no issues. There is a single email that always fails and I have been unable to send an email to this user through our system. The site is built with Elixir and uses the Bamboo Mailer, specifically the smtp_adapter but I believe this may be an issue with SES rather than our code or the Elixir libraries we are using.
The particular user always throws this error:
{{:nocatch, {:permanent_failure, "501 Invalid RCPT TO address provided\r\n"}},
From what I can tell the email address is valid and the customer has verified it as such and stated that emails have been sent and received to the user outside of our system.
I'm looking for some context on how SES determines what a valid RCPT TO address is and more generally how SES works to send emails. I haven't been able to find much on this issue from the SES docs.

Sending multiples emails with grails mail plugin

I am trying to send an email and just after I send the first email. I want to send a second email to a different address. I am using Grails mail plugin.
To send the two emails I use:
mailService.sendMail{
info first email
}
mailService.sendMail{
info second email
}
In development the two emails are sending, but not in production.
Somebody have an idea?

Sending email to the "outside world" from localhost using hMailServer and Gmail SMTP on Windows 7

I am not sure if this is technically possible but I am running a AMPPS box on Windows 7 as my localhost and I have configured it with Gmail SMTP (ssl://smtp.gmail.com) to send out email from my PHP scripts like joomla, wordpress, socialengine, etc.
Now I installed and setup hMailServer and I am able to send and receive emails locally but was wondering if there was a simple way that I could configure my localhost and email server to send out email to outside world (e.g. #hotmail.com or #yahoo.com receipients) using Gmail SMTP?
Currently with my setup, I am only able to receive installation confirmation emails from AMPPS but nothing else like "Forget Password" or "User Registration Forms" work.
Any ideas without getting too deep into code modification?
The simple answer is no, or rather it is far from easy, especially from a home based server.
And the reason is that your IP address amd mail server domain will not be considered as a ligitimate mail server by most of the legitimate mailservers you will be trying to send mail to, and they will just reject it as yet another spam server.
Have a look at these:
https://serverfault.com/questions/72559/setting-up-a-mail-server-best-practices-to-be-recognized-as-legitimate
How to conduct legitimate email campaigns

How to create an email address on your domain dynamically?

I want to send emails to users based on a topic. Let's say they create a topic called Vacation. I want to be able to send them an email via vacation#yourdomain.com, which they will be able to reply to(I have enabled my app to receive email messages).
How can I create this email account dynamically through my domain host(in this case namecheap ) in a Rails app?
IDonethis has this feature.
You have to configure a mail server host on your own server or use the API of your host service.

Emails sent from postfix via a Rails app are getting sent to spam in gmail

When using 'mail' command to send email to a gmail user, the email goes through fine. When sending an email using a Rails app, the email is sent to the spam folder for the gmail user. Can someone help me think through this?
Emails landing in SPAM can happen due to many reasons:
Wrong Mail Server setup: Checkout here on how to setup
Email content: Content of the email can also invite SPAM. Sites like SpamCheck helps to check whether the content of the email is ok.
As mentioned by #Noli above, using services like Sendgrid, Critsend etc for sending out emails, chances of landing them in Inbox will be more. You can use them as relay servers from Postfix. But the first two steps are anyway necessary.
Use Mailchimp if you want to sent emails to many people, for eg: for sending out newsletters, marketing emails etc.
Mail deliverabillty is extraordinarily hard to get right. You should consider leaving this to the specialists like Sendgrid or Mailchimp, and not spend tooooo much development time thinking about it
Another thing to check is that if this is a new server, you may need to set up Domain Keys to authenticate to Gmail. This happend to me and I was able to get my mail removed from the spam folder by following these:
https://help.ubuntu.com/community/Postfix/DomainKeys
https://help.ubuntu.com/community/Postfix/DKIM

Resources