Web based family history software

This Help forum is for issues relates to the latest release (1.6.x). For issues related to beta or github version please use their own Help forum.
Before asking for help please read "How to request help" by clicking on that tab above here.

Question PHP mail or SMTP not working

More
9 years 2 months ago #1 by bukbr
PHP mail or SMTP not working was created by bukbr
I tried everything.

SMTP (gmail account and also my paid server settings)
PHP mail

Does not work! There's no error messages when sending a message!

URL: www.bc.adm.br/genealogiabuchmann/

What´s the problem?

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #2 by fisharebest
Replied by fisharebest on topic PHP mail or SMTP not working
Perhaps there are no errors because the message was sent sucessfully?

Perhaps the mail was deleted by a spam-filter?

There are lots of reasons why mail is not received.

Is this your own server? What to the mail logs show?

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago - 9 years 2 months ago #3 by bukbr
Replied by bukbr on topic PHP mail or SMTP not working
Thanks for your quick answer!

Well, it's not a problem with spam filter. I tried different e-mails and servers.

The host server is not mine... the site is hosted at: www.kinghost.com.br/

I called the host support, and phpmail is working fine, we made a test together, with smtp and php mail.

Where can I find the log?
Last edit: 9 years 2 months ago by bukbr.

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #4 by bukbr
Replied by bukbr on topic PHP mail or SMTP not working
So, do we have a solution for it?

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #5 by fisharebest
Replied by fisharebest on topic PHP mail or SMTP not working

Where can I find the log?


Many errors/logs are recorded in Administration -> Logs

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #6 by bukbr
Replied by bukbr on topic PHP mail or SMTP not working
OK, I found... anything wrong, I think. I created a new test user (bukbr), whose e--mail is @yahoo. No messages received to confirm account creation!

Attached the log, after creation.

Thanks.
Attachments:

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #7 by fisharebest
Replied by fisharebest on topic PHP mail or SMTP not working
If there are no errors, then webtrees believes that the mail is sent.

Edit the file message.php and change lines ~207 from
Code:
$controller ->pageHeader() ->addInlineJavascript('window.opener.location.reload(); window.close();');

to
Code:
$controller->pageHeader();

Then try to send another message.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #8 by bukbr
Replied by bukbr on topic PHP mail or SMTP not working
OK, I tested, didn't work, attached the log...

I've created the user again...

After your instruction, I also tried to send an e-mail under Administration ==> Users, when I click the envolpe, I get a blank popup screen.

Thanks.
Attachments:

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #9 by fisharebest
Replied by fisharebest on topic PHP mail or SMTP not working
Then I guess that your change in message.php was incorrect, or is causing an error.

Your server is configured to hide errors (great!) so we must use guesswork....

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #10 by bukbr
Replied by bukbr on topic PHP mail or SMTP not working
Oh, you're right, I made a mistake!

Now, OK, I see the composition message again, but, it's still don't sending mails...

Attached the log, again.

Thanks! :-)
Attachments:

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #11 by fisharebest
Replied by fisharebest on topic PHP mail or SMTP not working

Now, OK, I see the composition message again, but, it's still don't sending mails...


You didn't say the important thing.



webtrees *did* send the message. Your mail server accepted the message, and gave a "success" message.

If the message is not delivered, look to your mail server.

Your mail server may be very fussy about the name/address given in the sender/from fields.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Attachments:

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #12 by bukbr
Replied by bukbr on topic PHP mail or SMTP not working
Well, it's configured to send using my gmail account settings...

Or you mean about where my website is hosted?

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #13 by fisharebest
Replied by fisharebest on topic PHP mail or SMTP not working

Well, it's configured to send using my gmail account settings...


Google recently changed the behaviour of their SMTP service. To continue to use it, you must change your google account settings to "allow low-security applications to connect".

Or try a different mail server....

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #14 by bukbr
Replied by bukbr on topic PHP mail or SMTP not working
Ops, sorry... it was selected to send via PHPmail! Changing to SMTP, configured my own domain settings (not gmail), I got the following error message:

Mail: '' does not match the expected structure for a DNS hostname, '' does not appear to be a valid URI hostname, '' does not appear to be a valid local network name

Attached how it's configured. The same settings works well on another installed software, in the same web server.

Att.
Attachments:

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #15 by Jackie
Replied by Jackie on topic PHP mail or SMTP not working
Hello Daniel,

Is this your host Wiki for email setting?

www.kinghost.com.br/wiki/doku.php/e-mail

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #16 by bukbr
Replied by bukbr on topic PHP mail or SMTP not working
Hello Jackie, exactly!

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #17 by Jackie
Replied by Jackie on topic PHP mail or SMTP not working
port should be 587 for STMP, should'nt it?

I am not sure I understand the whole translation from Google Translate.

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago - 9 years 2 months ago #18 by bukbr
Replied by bukbr on topic PHP mail or SMTP not working
Now I tried with my personal gmail. I got the following error message too: Mail: '' does not match the expected structure for a DNS hostname, '' does not appear to be a valid URI hostname, '' does not appear to be a valid local network name

Attached my gmail settings.

Also, teste with SSL as you said, you're right, I was wrong, :-) , but still don't work. Error message: error Mail: Could not open socket

Regards.
Last edit: 9 years 2 months ago by bukbr.

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago - 9 years 2 months ago #19 by Jackie
Replied by Jackie on topic PHP mail or SMTP not working
Hello Daniel,

In webtrees, there is three places where you need to set email.

1- Administration -> Site configuration -> Mail configuration tab

2- Administration -> Family trees -> your family tree -> General tab -> Contact information section

3- Administration -> Users -> your user account -> email column and lower (click the green + icon) « Preferred contact method »


To use a Google mail account, use the following settings: server=smtp.gmail.com, port=587, security=tls, username=xxxxx@gmail.com, password=[your gmail password]

Attachments:
Last edit: 9 years 2 months ago by Jackie.

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago - 9 years 2 months ago #20 by bukbr
Replied by bukbr on topic PHP mail or SMTP not working
OK, thanks for a while.

I made some changes, attached what I did:

After that, I teste again and got the following error: Unable to send a message. FROM:daniel.buchmann TO:teste (failed to send)
Attachments:
Last edit: 9 years 2 months ago by bukbr.

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum
}