Sendgrid and laravel 5 mail send and receive - laravel-5.1

I'm currently building a new version of an older website of mine and I'm trying to make a function that allowes users of mine to receive and send emails via that application. So they are be able to log in and send e-mails to another e-mail adress. Also if I sent an email to my domain I want to be able to receive the mail and have a catchall option. I'm currently using Laravel 5.1 and SendGrid.
I really don't know how to receive e-mails. The sending works.

Use this library.
Laravel sendgrid library
You can simply install like this.
Add the package to your composer.json and run composer update.
"require": {
"s-ichikawa/laravel-sendgrid-driver": "5.0.x-dev"
},

Related

Rails4 - How to add from name to emails sent from my rails app?

I have a rails app on heroku and I use sendgrid addon to send emails.
When I receive emails from Stack Exchange in my gmail, I receive it as follows.
Stack Exchange <do-not-reply#stackexchange.com>
But when I receive email from my website, it's like the following
noreply#mywebsite.com via sendgrid.info
How can I do the same with the emails from my website?
Is it possible to send it like this from my rails app?
My Website <noreply#mywebsite.com>
Does it have anything to do with my rails app at all?
Just use "My Website <noreply#mywebsite.com>" as the from value. (Yes, this is standard, and yes, ActionMailer will handle it as expected.)
Just replace "noreply#mywebsite.com" with "My Website <noreply#mywebsite.com>" where ever you are specifying from address.

Mandrill Inbound email- setting up Sending Domains with an app hosted on Heroku

I am trying to learn the ins and outs of Mandrill, so I created a test app that has no functionality except creating users, signing them in and out, and clicking on a link that sends the user an e-mail through ActionMailer.
So far all of this works fine. I have configured Mandrill to send e-mail in both development and production (Heroku). What I'm trying to do now is configure it to receive e-mails sent from users and do stuff with them. My problem is that I'm not sure what to add as my mail domain in the Sending Domains section of my Mandrill account page.
I've done this before with an app on Heroku using Mailgun. Mailgun gave me a Mailgun subdomain to use for user testing off the bat (app12345678.mailgun.org). I was able to send mail to postmaster#app12345678.mailgun.org and it worked perfectly. With Mandrill it's proven a bit more difficult.
Mandrill doesn't seem to provide a Mandrill subdomain to start with. I suppose my question is: is it at all possible to get a Mandrill subdomain for testing like the one Mailgun provides? If not, how can I go about user testing inbound e-mail with Mandrill if I don't currently own my own custom domain? What can I use as the Sending Domain?
it's not currently possible to use Mandrill's inbound email routing unless you have a domain/subdomain to work with. We don't provide a testing subdomain to use for inbound routing.
Any domains you actually send from in Mandrill will be added to the Sending Domains page. You don't have to manually enter any domains there, since we'll detect any that you use and show them there automatically. If you want to set up SPF and DKIM for your sending domain, you can manually add it in order to validate the records have been added correctly.
If you have other questions specific to your account, our support team is also happy to help if you want to get in touch via the Support button in your account.

Magento - doesn't send any email

i have a problem with mail sending: magento doesn't send any mail, i'm trying to use the sendfriend functionality (i've extendend the ProductController of that Sendfriend module), but the problem is about any email (i've tried to do a registration or to change a password, but no email was sent). backend settings seems to be ok:
System->Configuration->system->Mail sending settings->disable Email Communications->No;
System->Configuration->system->Mail sending settings->Host ->locahost;
with the same settings on another local magento installation the system send emails correctly. what can i check?
you don't need to do any coding stuff. Its already available in Magento. You just need to enable the option of Email to a friend from the back-end. Hope this help you.

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

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

I can send an email from my Rails app, but not an SMS text through an email gateway

I have application that needs to send emails and sms text messages. It sends emails just fine, but when I try to send text messages using email gateways (for verizon, xxxyyyzzzz#vtext.com) I get nothing. I have texted the phone using though the email gateway using my gmail account, so I know it works. I would just think that from my app's point of view I am just sending out another email. Any idea why this doesn't work? Or what I can do to troubleshoot it?
I should also note that I am doing this from a Rails app on my local computer...not that it should matter.
Maybe Verizon has software that can identify emails sent from software rather than humans, and rejects yours?
Try making your software add all the same headers (eg. X-Mailer) that a normal email client would add.
Verizon could be doing a reverse DNS query as a simple spam check. Your ISP's info could show up during this look up instead of the return address info that your email message contains, and thus could be getting blocked.
To troubleshot this make sure that the return e-mail address that you are using is coming from an ISP e-mail account.
Here is how to debug it on Linux. Run your Rails application server with strace:
strace -s99999 -e connect,read,write,close -o strace.log script/server
Then examine strace.log and see exactly which SMTP server the Rails application connects to, and what it reads and writes.
Then do the same with your favorite mail client (recommended: mutt, because Thunderbird is slow in strace).
Try to send exactly the same bytes from Rails what your mail client sends.
I have used SMS_Fu in the past to send out text messages. It has worked wonderfully.
I have written a client app for Ruby for sending SMS, please see http://freebiesms.blogspot.com/2009/07/send-free-sms-from-ruby.html to download
complete source code.
Regards
Dan

Resources