3
votes

My OpenCart website uses SendGrid as its email sending system. This all worked correctly up until recently. When using functions which require sending an email to the admin (eg. new order alert emails, creating a new account), I've been getting this error:

 Notice: Error: Password not accepted from server! in .../system/library/mail.php on line 251

In OpenCart Settings > Mail, my settings are as follows:

Mail Protocol: SMTP
SMTP Host: smtp.sendgrid.net
SMTP Username: <username>
SMTP Password: <pass>
SMTP Port: 25
SMTP Timeout: 5

This is according to SendGrid's documentation: https://sendgrid.com/docs/Classroom/Basics/Email_Infrastructure/smtp_ports.html

Can anyone advise? These settings work on my localhost. I contacted the host to see if they blocked the SMTP port, but they replied that they don't have the ability to block the port since the SMTP host is not their website, but instead SendGrid.

1
Have you tried to use port 587 instead of 25? Some webhosts limit that port to fight against spam. Your host does have the ability to block the port, the outbound request is from their server. - Matt
What version of OpenCart are you running? - Matt
@Matt OpenCart v1.5.5.1. I have tried ports 25, 2525, 587, 465, and 587 as per SendGrid documentation with no luck - user2181948
@user2181948 i having the same issue. did you solve it? - redochka
@redochka Have not solved it unfortunately - user2181948

1 Answers

0
votes

This is not a port problem. I had the same issue: the SendGrid documentation is wrong. Documentation screenshot reports SendGrid username, but you have to use 'apikey'. I suggest to use port 587.