Resolved Could not send mail with Laravel

Status
Not open for further replies.

ebookx10

New Member
Messages
7
Reaction score
0
Points
1
I installed Laravel in my free hosting website.
I want to use the Mail send feature for my website.

First, I tried with SMTP configuration obtained from DirectAdmin / Email Accounts / Download Outlook Configuration. The configuration is something as below:
Code:
"Account Name"="admin@ebook.x10.mx"
"Connection Type"=dword:00000003
"POP3 Server"="mail.ebook.x10.mx"
"SMTP Server"="mail.ebook.x10.mx"
"POP3 User Name"="admin@ebook.x10.mx"
"SMTP User Name"=""
"POP3 Prompt for Password"=dword:00000000
"SMTP Prompt for Password"=dword:00000000
"SMTP Display Name"="admin@ebook.x10.mx"
"SMTP Email Address"="admin@ebook.x10.mx"
"POP3 Skip Account"=dword:00000000
"SMTP Use Sicily"=dword:00000002
"POP3 Timeout"=dword:0000003c
"SMTP Timeout"=dword:0000003c
"SMTP Secure Connection"=dword:00000000
"SMTP Split Messages"=dword:00000000
"POP3 Port"=dword:0000006e
"SMTP Port"=dword:0000024b

So, I set my Laravel configuration as below:
Code:
MAIL_MAILER=smtp
MAIL_HOST=mail.ebook.x10.mx
MAIL_PORT=587
MAIL_USERNAME=admin@ebook.x10.mx
MAIL_PASSWORD=<my email password>
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=admin@ebook.x10.mx
MAIL_FROM_NAME="Admin (admin@ebook.x10.mx)"

But when I run the code, following error is happen:
Code:
Swift_TransportException
Connection could not be established with host mail.ebook.x10.mx :stream_socket_client(): unable to connect to mail.ebook.x10.mx:587 (Connection refused)
I think that my Laravel internal configuration is correctly, is there any of above parameter is incorrect?
Or, is this function available in my hosting?

In addition, when I change to use 'sendmail':
Code:
MAIL_MAILER=sendmail
Following error also happen:
Code:
ErrorException
proc_open() has been disabled for security reasons
Seem this feature is not available in my hosting.
 

garrettroyce

Community Support
Community Support
Messages
5,609
Reaction score
250
Points
63
sendmail won't work, because proc_open() won't work, because it's a security issue and is disabled.

Try using "localhost" for mail and see if that has any effect. It sounds like maybe your email is being blocked before Laravel can even connect.
 

ebookx10

New Member
Messages
7
Reaction score
0
Points
1
sendmail won't work, because proc_open() won't work, because it's a security issue and is disabled.

Try using "localhost" for mail and see if that has any effect. It sounds like maybe your email is being blocked before Laravel can even connect.
Thank for your checking.
I just try test again and its worked, without modify anything :)
In addition,
Code:
MAIL_HOST=localhost
also worked now.
 
Status
Not open for further replies.
Top