Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Dreamhost Email

Started by Muut Archive 10 years ago · 2 replies · 1083 views
10 years ago

I'm working with Grav hosted on Dreamhost, and I'm having trouble getting an email contact form working.

I used the example contact form from the documentation, minus the captcha parts, and I setup an account with mailtrap.io. The form completes correctly, and the email is saved on disk. However, the email doesn't show up in the trap.io account.

Does anyone have any pointers for getting email on Dreamhost working?

I'd like to switch to using the Dreamhost email servers eventually, so any tips on that would be great too.

Email config (Slightly obfuscated. I have a real domain.):
Mail Engine: PHP Mail
Content type: Plain text
Email from : [email protected]
Email from name: Customer Contact Form
Email to
: [email protected]
Email to name: Ryan
SMTP server: mailtrap.io
SMTP port: 2525
SMTP encryption: None
SMTP login name: <trap.io username>
SMTP password: <trap.io password ;)>
Path to sendmail: /usr/sbin/sendmail

Mail Engine: sendmail breaks with:
Swift_TransportException
Unsupported sendmail command flags [/usr/sbin/sendmail]. Must be one of "-bs" or "-t" but can include additional flags.

Mail Engine: SMTP breaks with:
Swift_TransportException
Connection could not be established with host mailtrap.io [php_network_getaddresses: getaddrinfo failed: Name or service not known #0]

10 years ago

I got it working. It still needs work, but it works.

Mail Engine: Sendmail
Path to sendmail: /usr/sbin/sendmail -t

10 years ago

You setup Mailtrap SMTP details, BUT you still had "Mail engine" to "PHP Mail" instead of SMTP.
So the email was not sent using mailtrap's SMTP server.

"PHP Mail" is known to often not work, due to various reasons, and I recommend using a SMTP server instead. Like GMail's one, for example, or your own.

Now you're still not using the SMTP server you setup, but using Sendmail.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1359 9 years ago
Archive · by Muut Archive, 9 years ago
2 936 9 years ago
Archive · by Muut Archive, 9 years ago
2 4066 9 years ago
Archive · by Muut Archive, 9 years ago
1 2957 9 years ago
Archive · by Muut Archive, 9 years ago
3 1121 9 years ago