Could anyone let me know if there are any configuration/settings for email notification as it does not seem to work for me?
I tried sending mail using "Send mail to users" functionality and it did say
■Mail sent to admin [admin's email removed from here].
■1 mail has been sent.
but no mail received.
It also doesn't send any subscription/unsubscription notification as expected.
I'm running Piwigo 2.1.6 on godaddy.com hosting server and my host does allow php mail (I think it does, as I tried sending mail via mail() function in a php file which works fine).
Could anyone also let me know what notifications are supposed to be sent/received by subscribed users?
Any help would be highly appreciated.
Thanks
Offline
No mail on spam?
Offline
Nopes, no mail on spam.
So I guess no configuration required for emails. It should have worked as is.
Any ideas?
Thanks,
Offline
No try to use smtp option on local config?
Could you give your site link? On MP if you want!
Offline
How to try SMTP option?
Have sent link to your email.
Thanks,
Offline
saber wrote:
How to try SMTP option?
I registered on your site. Could you try to send me a mail.
saber wrote:
Have sent link to your email.
With local file editor, there are smtp lines.
Offline
Have added you to subscriptions, so you should receive a notification.
I have also sent you an email via "Send mail to users"
Let me know if you receive these 2 emails.
Piwigo messages attached for you info.
Offline
I received nothing!
I try "forgot password" and it's the same thing.
Are you contact too your hosting support?
Offline
It may be quite dumb to ask, but anyways, what I need to ask from hosting suppor? I thought pwg was using PHP mail function which works well on my site. Is pwg using some other method of mail?
Can you guide me to the instructions for setting up the SMTP option?
Thanks
Offline
saber wrote:
It may be quite dumb to ask, but anyways, what I need to ask from hosting suppor? I thought pwg was using PHP mail function which works well on my site. Is pwg using some other method of mail?
Works with a simple example.
Piwigo send html and invisibles recipients.
Support can see error on their log.
Try to send mail without html options.
There are an option on NBM
or with plugin localfileeditor:
// default_email_format: // Define the default email format use to send email // Value could be text/plain or text/html $conf['default_email_format'] = 'text/plain';
saber wrote:
Can you guide me to the instructions for setting up the SMTP option?
with plugin localfileeditor:
// smtp configuration // (work if fsockopen function is allowed for smtp port) // smtp_host: smtp server host // if null, regular mail function is used // format: hoststring[:port] // exemple: smtp.pwg.net:21 // smtp_user/smtp_password: user & password for smtp identication $conf['smtp_host'] = ''; $conf['smtp_user'] = ''; $conf['smtp_password'] = '';
With plugin localfileeditor on personal plugin section you can add log on a mail directory:
/* Log Mail on files */ add_event_handler('send_mail', 'pwg_send_mail_log', 1, 6); function pwg_send_mail_log($result, $to, $subject, $content, $headers, $args) { global $conf, $user, $lang_info; $dir = $conf['local_data_dir'].'/mail'; if ( mkgetdir( $dir, MKGETDIR_DEFAULT&~MKGETDIR_DIE_ON_ERROR) ) { list($curdate, $curtime) = mysql_fetch_row(pwg_query('SELECT CURDATE(), CURTIME();')); $filename = $dir.'/'. str_replace('-', '', $curdate).'.'.str_replace(':', '', $curtime).'.'. 'mail.'.$user['username'].'.'.$lang_info['code'].'.'.$args['theme']; if ($args['content_format'] == 'text/plain') { $filename .= '.txt'; } else { $filename .= '.html'; } $file = fopen($filename, 'w+'); fwrite($file, $to ."\n"); fwrite($file, $subject ."\n"); fwrite($file, $headers); fwrite($file, $content); fclose($file); } return $result; }
Offline
I tried the SMTP option and started getting following errors:
Warning: fsockopen() [function.fsockopen]: unable to connect to relay-hosting.securesever.net:25 (Connection refused) in/{...}/piwigo/include/class_smtp_mail.inc.php on line 108
Warning: Could not connect to smtp host "relay-hosting.securesever.net:25" (111) (Connection refused) in/{...}/piwigo/include/class_smtp_mail.inc.php on line 177
Warning: Cannot modify header information - headers already sent by (output started at /{...}/piwigo/include/class_smtp_mail.inc.php:108) in /{...}/piwigo/include/page_header.php on line 98
After googling a lot on these errors, I finally found that it has something to do with the email headers, as my hoster, godaddy.com filters email headers for spam mails.
The solution as posted on http://community.godaddy.com/groups/ema … rom-forum/ is:
[Quote
Just spent all day banging my head against this with tech support to absolutely no avail.
There’s a big thread about the problem over at Simple Machines Forums. Here’s a link to the golden post:
http://www.simplemachines.org/community … msg2921276
In short, Godaddy is spam-filtering outgoing email with this header:
X-Mailer: SMF
It wasn’t in the body of my email, it wasn’t the activation link, it’s that header that’s the culprit.
The solution:
* Edit your Sources/Subs-Post.php file,
* Change X-Mailer: SMF to to X-Mailer: SMX
Unquote]
Could you please clarify, if something of this sort is in use in Piwigo mail function?
I think sending to invisible recipients could be a culprit as well.
Offline
Try that:
Modify file include/functions_mail.inc.php.
Delete line:
$headers.= 'X-Mailer: Piwigo Mailer'."\n";
or replace by
$headers.= 'X-Mailer: SMX'."\n";
Offline
And finally the email started firing!!!
It was an issue with the headers but not with 'X-Mailer:' rather with 'From:' entry. Godaddy.com blocks any outgoing mails with "From:" header entry of aol, gmail, yahoo, hotmail, live, aim, or msn. I had my gmail account for admin email that was being blocked...
Offline
SMTP will also fail if the "From" field in the php.ini file is empty. No php.ini, add one with PHP Config in Software/Service on the cPanel. Then edit with File Manager on the cPanel and add a real email address.
saber wrote:
And finally the email started firing!!!
It was an issue with the headers but not with 'X-Mailer:' rather with 'From:' entry. Godaddy.com blocks any outgoing mails with "From:" header entry of aol, gmail, yahoo, hotmail, live, aim, or msn. I had my gmail account for admin email that was being blocked...
How did you do that and make the change?