errno=32 Broken pipe - when sending email via Gmail

2,122 views
Skip to first unread message

Michael Howarth

unread,
Apr 1, 2016, 8:36:16 AM4/1/16
to ResourceSpace
I have set my config.php file to send mail via Gmail, however I'm getting an errno=32 Broken pipe error as detailed below.

Here are the settings I have in my /var/www/html/include/config.php file


# Email settings
$email_notify = 'm...@px.com';
$email_from = 'l...@px.com';

# Use an external SMTP server for outgoing emails (e.g. Gmail).
$use_smtp=true;
# SMTP settings:
$smtp_secure='tls'; # , 'tls' or 'ssl'. For Gmail, 'tls' or 'ssl' is required.
$smtp_host='smtp.gmail.com'; # Hostname, e.g. 'smtp.gmail.com'.
$smtp_port=465; # Port number, e.g. 465 for Gmail using SSL.
$smtp_auth=true; # Send credentials to SMTP server (false to use anonymous access)
$smtp_username='n...@gmail.com'; # Username (full email address).
$smtp_password='P@S$w0Rd'; # Password.
#enable php mailer - this is also to allow HTML format emails.
$use_phpmailer=true;

*Username & Password are dummy data.


Sorry, an error has occurred.
Please go back and try something else.
You can check your installation configuration.
/var/www/html/lib/phpmailer_v5.2.6/class.smtp.php line 1023: fwrite(): send of 26 bytes failed with errno=32 Broken pipe


To add a little more info, I've been having problems getting Resourcespace to send mail via any SMTP mail server, all the settings I've tried previously have thrown back a standard:


Message could not be sent.

Mailer Error: SMTP Connect() failed.


If I change those Google login settings I posted above for the Gmail login from tls to ssl for example, I will get the Message could not be sent error.
I originally tried unsuccessfully to connect to the company SMTP server but switched to trying gmail on account of consistently getting the SMTP connect () failed message.


I'm really not sure what else I can try here. Does anyone have any suggestions?

Allison Stec

unread,
Apr 1, 2016, 8:40:47 AM4/1/16
to resour...@googlegroups.com
I use tls with port 587 for gmail. Also, be sure to make sure you've enabled IMAP in your gmail settings.
--
ResourceSpace: Open Source Digital Asset Management
http://www.resourcespace.org
---
You received this message because you are subscribed to the Google Groups "ResourceSpace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to resourcespac...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Howarth

unread,
Apr 4, 2016, 2:06:14 PM4/4/16
to ResourceSpace
Great stuff! Thank you Allison.  Port 587 worked for me, too.

My main problem was that because I use 2-step verification on my Google account, my password wouldn't work, I needed to create an app specific password so that Resourcespace could access the Gmail SMTP server.

More info:
https://support.google.com/mail/troubleshooter/1668960?hl=en&rd=1
Click the drop down for "Can't sign in"

Also:
https://support.google.com/accounts/answer/185834?hl=en#ASPs
I turned on 2-Step Verification and an app on my phone or computer stopped working


This could be added as a little extra info on the Resourcespace WIki.
Reply all
Reply to author
Forward
0 new messages