PDA

View Full Version : email notification fails


imixed
02-01-2009, 11:33 AM
Hi Folks,
Unfortunately, the email notification fails when adding a comment to an image.
I already used the forums search function and tried out a few things ... but still no progress.

Here is the information overview from the admin gui:

You are running Pixelpost version: 1.7.1 (Better than Ever) - January 2008
Latest Pixelpost version: You have the newest version of Pixelpost!

URL http://www.imixed.net/admin/index.php
PHP-version 5.2.6 (Pixelpost's min requirement: PHP version: 4.3.0 )

Session save path /is/htdocs/user_tmp/wp1003461_8EGHV4ZHZN

MySQL version 5.0.32-Debian_7etch8-log (Pixelpost's min requirement: MySQL: 3.23.58 )

GD-lib bundled (2.0.34 compatible) with JPEG support

File Uploads to Pixelpost site are possible.

Server Software Apache/2.2

EXIF Pixelpost is using exifer v1.5 for EXIF-information.


Within the options section it is checked to send email notification on comments. The setting "use HTML notification email" is disabled (but I also tried enabled).

In another thread I found a mail.php script that you can still access by launching http://www.imixed.net/mail.php.

This will result in:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /is/htdocs/wp1003461_8EGHV4ZHZN/www/imixed/shoots/mail.php on line 3


The content of the script is:
<?php

$to******=*'mario@imixed.net';

$subject*=*'Test*Mailing';
$message*=*'This*is*a*test*mailing*using*PHPs*mail ()*function.';
$headers*=*'From:*admin@example.com'*.*"\r\n"*.
***********'Reply-To:*admin@example.com'*.*"\r\n"*.
***********'X-Mailer:*PHP/'*.*phpversion();

if(mail($to,*$subject,*$message,*$headers)){

****echo*"Mail*successfully*sent*to*&lt;$to&gt;";
}else{

****echo*"Mail*failed*to*send*to*&lt;$to&gt;";
}

?>

Any ideas?

BTW: If it could be interesting for you ...
My site is based on WebPack L package hosted at http://www.hosteurope.de

Any tip is appreciated!

sentinel
02-01-2009, 01:19 PM
uhm are all those asterisks in the mail.php file at your webserver too?
if yes, i think they shouldn't

imixed
02-02-2009, 06:58 PM
Hmmmm ... the asteriks are generated here when saving my post.
This time I modfied my posting after saving it to delete the asteriks.
On my webserver the file is proper.
Now - as I deleted the blank lines - the parse error is reported for line 2, of course.

<?php
$to ='mario@imixed.net';
$subject = 'Test Mailing';
$message = 'This is a test mailing using PHPs mail() function.';
$headers = 'From: admin@example.com' . "\r\n" .
'Reply-To: admin@example.com' . "\r\n"*.
'X-Mailer: PHP/' . phpversion();
if(mail($to, $subject, $message, $headers)){
echo*"Mail successfully sent to &lt;$to&gt;";
}else{
echo*"Mail failed to send to &lt;$to&gt;";
}
?>

sentinel
02-02-2009, 07:21 PM
huh thats strange. which editor did you use to create the mail.php file ?
did you transmit the file in _text-mode_ per ftp?

imixed
02-02-2009, 07:52 PM
Damned! That's embarassing ...
You are so right! I performed the ftp in binary mode.
No, that I switched to text mode the script ran 'til the end.

And the feedback is:
Mail failed to send to <mario@imixed.net>

Well, as neither the Pixelpost commenting nor the test script succeeded I guess that the problem is probably more to do with the configuration on the hosting site, right?

Any hints from your site that I should check with my hosting provider?

imixed
02-02-2009, 08:35 PM
Yeah ... done!

As I just found in the FAQ of my provider (Hosteurope): In order to send PHP mails it is mandatory there at Hosteurope to specify a valid return address by using the "-f" parameter. Moreover, this address must also be specified within the appropriated WebPack.
Without this information sending mails is not possible and the mail() function end up with errors.

To solve the issue users have either to use the "-f" parameter in each individual script where the mail() function is used or they can configure a general default return address that will be used in case there isn't any specified in a script.

Now, after configuring the default everything is running fine.

@Sentinel: Thx for your support and pointing out the question regarding the FTP transmit mode.