Ruby mailer is coming up with an EOFError
This can also happen if the SMTP server is down. (I use a 3rd party mailer called Sendgrid and this happened once when it goes down entirely)
This can also happen if the SMTP server is down. (I use a 3rd party mailer called Sendgrid and this happened once when it goes down entirely)
The following works: ( echo “From: ${from}”; echo “To: ${to}”; echo “Subject: ${subject}”; echo “Content-Type: text/html”; echo “MIME-Version: 1.0”; echo “”; echo “${message}”; ) | sendmail -t For troubleshooting msmtp, which is compatible with sendmail, see: https://wiki.archlinux.org/index.php/Msmtp https://superuser.com/a/868900/9067
I’m not entirely sure this would work but you can give it a shot /** * Send Mail from Parts Specification Form */ public function sendMail(Request $request) { $data = $request->all(); $messageBody = $this->getMessageBody($data); Mail::raw($messageBody, function ($message) { $message->from(‘yourEmail@domain.com’, ‘Learning Laravel’); $message->to(‘goper.zosa@gmail.com’); $message->subject(‘Learning Laravel test email’); }); // check for failures if (Mail::failures()) { // … Read more
On the top of my head, there are two methods to avoid threading: set the SMTP header X-Entity-Ref-ID with any value. This is what Google+ notifications do. change the sender email (you can use From: info+randomstring@example.com). This is what Facebook notifications do. The threading will be made if you force it with Reference or Reply-To.
Try doing this: recipients=”user1@mail.example,user2@mail.example,user3@mail.example” And another approach, using shell here-doc: /usr/sbin/sendmail “$recipients” <<EOF subject:$subject from:$from Example Message EOF Be sure to separate the headers from the body with a blank line as per RFC 822.
First you need to compose the message. The bare minimum is composed of these two headers: MIME-Version: 1.0 Content-Type: text/html … and the appropriate message body: <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”> <html> <head><title></title> </head> <body> <p>Hello, world!</p> </body> </html> Once you have it, you can pass the appropriate information to the mail … Read more
Since no answer has been accepted, and none of the others worked for me: using System.Configuration; using System.Net.Configuration; // snip… var smtpSection = (SmtpSection)ConfigurationManager.GetSection(“system.net/mailSettings/smtp”); string username = smtpSection.Network.UserName;
Fixed a few typos in the working code above: MailMessage msg = new MailMessage(); msg.To.Add(new MailAddress(“someone@somedomain.com”, “SomeOne”)); msg.From = new MailAddress(“you@yourdomain.com”, “You”); msg.Subject = “This is a Test Mail”; msg.Body = “This is a test message using Exchange OnLine”; msg.IsBodyHtml = true; SmtpClient client = new SmtpClient(); client.UseDefaultCredentials = false; client.Credentials = new System.Net.NetworkCredential(“your user … Read more