I am running a mediawiki 1.7.1 on a PC of my company, and the email server is another pc on the intranet. I setted the mailserver address in php.ini, and enabled the mail function in mediawiki. Once I test the mail function in mediawiki I got the message like this:
"Error sending mail: mail() [function.mailhttp://192.168.21.25/ewiki/function.mail]: SMTP server response: 501 5.5.4 Invalid Address"
However, the following script in a soly php file has been tested working well.
<?php // The message $message = "Line 1\nLine 2\nLine 3";
// In case any of our lines are larger than 70 characters, we should use wordwrap() $message = wordwrap($message, 70);
// Send mail('caffinated@example.com', 'My Subject', $message); ?>
I wonder is it a bug of mediawiki? BTW, I am running mediawiki on windows xp sp2 professional chinese edition, apache 2.0.58, php 5.1.4 and mysql 5.0.22 .
If the 5.5.4 error is comming for your email server, it may be that you are trying to send it an email that it does not have a registered user for. If you are goign to use your mail server as a relay agent, you may need to enable relaying from your wiki server.
xaosflux ----- Original Message ----- From: "liu haokai" haokai.liu@gmail.com To: "Wikimedia developers" wikitech-l@wikimedia.org Sent: Sunday, August 13, 2006 8:28 AM Subject: [Wikitech-l] An error occur when send a mail
I am running a mediawiki 1.7.1 on a PC of my company, and the email server is another pc on the intranet. I setted the mailserver address in php.ini, and enabled the mail function in mediawiki. Once I test the mail function in mediawiki I got the message like this:
"Error sending mail: mail() [function.mailhttp://192.168.21.25/ewiki/function.mail]: SMTP server response: 501 5.5.4 Invalid Address"
However, the following script in a soly php file has been tested working well.
<?php // The message $message = "Line 1\nLine 2\nLine 3"; // In case any of our lines are larger than 70 characters, we should use wordwrap() $message = wordwrap($message, 70); // Send mail('caffinated@example.com', 'My Subject', $message); ?>
I wonder is it a bug of mediawiki? BTW, I am running mediawiki on windows xp sp2 professional chinese edition, apache 2.0.58, php 5.1.4 and mysql 5.0.22 . _______________________________________________ Wikitech-l mailing list Wikitech-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/wikitech-l
A email can be sent through the following script, sure, the mail address has been replaced by an existing one: <?php // The message $message = "Line 1\nLine 2\nLine 3";
// In case any of our lines are larger than 70 characters, we should use wordwrap() $message = wordwrap($message, 70);
// Send mail('caffinated@example.com', 'My Subject', $message); ?>
I wonder is the problem related to the UTF-8 email address?
2006/8/14, xaosflux xaosflux@gmail.com:
If the 5.5.4 error is comming for your email server, it may be that you are trying to send it an email that it does not have a registered user for. If you are goign to use your mail server as a relay agent, you may need to enable relaying from your wiki server.
xaosflux ----- Original Message ----- From: "liu haokai" haokai.liu@gmail.com To: "Wikimedia developers" wikitech-l@wikimedia.org Sent: Sunday, August 13, 2006 8:28 AM Subject: [Wikitech-l] An error occur when send a mail
I am running a mediawiki 1.7.1 on a PC of my company, and the email
server
is another pc on the intranet. I setted the mailserver address in
php.ini,
and enabled the mail function in mediawiki. Once I test the mail
function
in mediawiki I got the message like this:
"Error sending mail: mail() [function.mailhttp://192.168.21.25/ewiki/function.mail]: SMTP server response: 501 5.5.4 Invalid Address"
However, the following script in a soly php file has been tested working well.
<?php // The message $message = "Line 1\nLine 2\nLine 3"; // In case any of our lines are larger than 70 characters, we should use wordwrap() $message = wordwrap($message, 70); // Send mail('caffinated@example.com', 'My Subject', $message); ?>
I wonder is it a bug of mediawiki? BTW, I am running mediawiki on windows xp sp2 professional chinese edition, apache 2.0.58, php 5.1.4 and mysql 5.0.22 . _______________________________________________ Wikitech-l mailing list Wikitech-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/wikitech-l
"liu haokai" wrote:
A email can be sent through the following script, sure, the mail address has been replaced by an existing one:
<?php // The message $message = "Line 1\nLine 2\nLine 3"; // In case any of our lines are larger than 70 characters, we should use wordwrap() $message = wordwrap($message, 70); // Send mail('caffinated@example.com', 'My Subject', $message); ?>
I wonder is the problem related to the UTF-8 email address?
Mail addresses shouldn't be utf-8. As SMTP protocol is 7-bit ascii (unless the server has 8bitmime extension, which i think only applies for the content), a utf-8 email with non us-ascii chars (those which fall outside the 7-bit) could be rejected by the server, and probably should, as it has no mean of knowing if the next server is going to accept this protocol violation, and as the smtp specification says the user part of email shouldn't be touched, i wouldn't accept it.
Well, can I conclude that the problem is that the Mediawiki submit a UTF-8 mail address. I refered the database of my mediawiki, and the mail address is stored in UTF-8.
2006/8/16, Platonides Platonides@gmail.com:
"liu haokai" wrote:
A email can be sent through the following script, sure, the mail address has been replaced by an existing one:
<?php // The message $message = "Line 1\nLine 2\nLine 3"; // In case any of our lines are larger than 70 characters, we should use wordwrap() $message = wordwrap($message, 70); // Send mail('caffinated@example.com', 'My Subject', $message); ?>
I wonder is the problem related to the UTF-8 email address?
Mail addresses shouldn't be utf-8. As SMTP protocol is 7-bit ascii (unless the server has 8bitmime extension, which i think only applies for the content), a utf-8 email with non us-ascii chars (those which fall outside the 7-bit) could be rejected by the server, and probably should, as it has no mean of knowing if the next server is going to accept this protocol violation, and as the smtp specification says the user part of email shouldn't be touched, i wouldn't accept it.
Wikitech-l mailing list Wikitech-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/wikitech-l
On 17/08/06, liu haokai haokai.liu@gmail.com wrote:
Well, can I conclude that the problem is that the Mediawiki submit a UTF-8 mail address. I refered the database of my mediawiki, and the mail address is stored in UTF-8.
I don't have the original post to hand, but if it's a machine running Windows, it could well be this bug: http://bugzilla.wikimedia.org/show_bug.cgi?id=4979. Windows-based SMTP servers can't handle the "John Smith john@smith.org" email address format, and croak on it. The workaround in comment #2 on the referenced URL should help.
Rob Church
On Thu, Aug 17, 2006 at 11:05:52AM +0100, Rob Church wrote:
http://bugzilla.wikimedia.org/show_bug.cgi?id=4979. Windows-based SMTP servers can't handle the "John Smith john@smith.org" email address format, and croak on it. The workaround in comment #2 on the referenced URL should help.
Windows SMTP servers violate RFC2822, huh?
What a surprise.
Cheers, -- jra
On 17/08/06, Jay R. Ashworth jra@baylink.com wrote:
On Thu, Aug 17, 2006 at 11:05:52AM +0100, Rob Church wrote:
http://bugzilla.wikimedia.org/show_bug.cgi?id=4979. Windows-based SMTP servers can't handle the "John Smith john@smith.org" email address format, and croak on it. The workaround in comment #2 on the referenced URL should help.
Windows SMTP servers violate RFC2822, huh?
Upon reading one of the Notes on http://uk.php.net/manual/en/function.mail.php, it seems it's not the Windows SMTP server, but PHP's incompetent parsing, since it handles headers in the message differently under that platform.
Rob Church
wikitech-l@lists.wikimedia.org