2 afwas Feb 01, 2008 18:35

Hi Afwas
Thank you for you quick reply.
I tried the method desribed in your post but I still get no email sent to @hotmail address and now after a user registers b2evo does not return to screen telling them a validation email has been sent.
I couldnt find a folder called "_misc" but found the files in question in "inc/core" was I correct with this choice also I have set folder permissions to 755 on "lib".
Your further help would be very appreciated.
Quick note:
my server has sendmail on and as far as I know its working
Hi andyell,
This looks like a problem from the server that sends the mail. Can yu try to set this up with some very other mailserver like yahoo! or Gmail?
It looks like the SMTP blocks the mail probably due to spam measures. Can you send regular mails to @hotmail users?
andyell wrote:
now after a user registers b2evo does not return to screen telling them a validation email has been sent.
When did this happen? Is it only with hotmail users?
Good luck
When I click register after entering details for new user the page will not reload to state that it has sent a validation email this happens now with all email accounts I have tried using. It worked before I made the changes in your post so think I have edited something wrong
http://www.blog.hemminga.net/B2evoforum/RequestRegistration.png
Do the other mails get sent, I means not @hotmail and not registration?
Good luck
If it helps, this is my mail function, it has no problems sending to hotmail
function SendMail( $destinations, $subject = 'Enquiry from your website', $from = 'sitemessage@yourdomain.com', $notes = '' )
{
$recipients = ( is_array( $destinations ) ? $destinations : array( $destinations ) );
// setup all the fields/values as $message
$message = $notes."\n";
foreach( $this->known_fields as $field )
$message .= $field->nice_name.' : '.( empty( $field->value ) ? '' : $field->value )."\n\n";
// setup all headers
$from_email = ( empty( $this->known_fields[ $from ]->value ) ? $from : $this->known_fields[ $from ]->value );
$headers = 'From: '.$from_email."\r\n";
$headers .= 'Sender: '.$from_email."\r\n";
$headers .= 'Return-Path: '.$from_email."\r\n";
$headers .= 'X-Sender: '.$from_email."\r\n";
$headers .= 'Reply-To: '.$from_email."\r\n" ;
$headers .= 'Content-type: text/plain;' . "\r\n";
$headers .= 'MIME-Version: 1.0' . "\r\n";
ini_set( 'sendmail_from',$from_email);
$error_free = true;
$message .= $this->CheckExtra();
//var_dump( $message );
// send email to each recipient
foreach( $recipients as $recipient )
{
if( !@mail( $recipient, $subject, $message, $headers ) ) $error_free = false;
}
return $error_free;
}
¥
Yeah all other emails sent ok it was only hotmail so far that I have had problems with but image above is the screen I now do not get since editing files
sorry if im not to clear about all this I am really really new to all of this
in what file would I place that script and should I undo the changes I have made so far
Sorry, that's a snippet from my whole email class, I posted it in case it helped Afwas to solve your hotmail problem.
You *might* get away with amending the current SendMail function in /inc/_misc.funcs.php ( approx 1516 ) to add the extra headers
// Specify charset and content-type of email
$headers['Content-Type'] = 'text/plain; charset='.$current_charset;
$headers['X-Mailer'] = $app_name.' '.$app_version.' - PHP/'.phpversion();
$headers['X-Remote-Addr'] = implode( ',', get_ip_list() );
$headers[ 'From' ] = $from."\r\n";
$headers ['Sender'] = $from."\r\n";
$headers['Return-Path'] = $from."\r\n";
$headers['X-Sender'] = $from."\r\n";
$headers['Reply-To'] = $from."\r\n" ;
$headers['MIME-Version' ] = '1.0' . "\r\n";
ini_set( 'sendmail_from',$from);
¥
Yabba means that you should stick to the original function and not use my patch. The reason for this is that my patch does not use the headers generated by B2evo. So start of with the original folder and try Yabba's suggestion.
At the moment I am testing, but also I am hungry. I hit some weird errors, that require a whole lot of investigation.
http://www.blog.hemminga.net/B2evoforum/MailError.png
The text clearly doesn't match the debug output. This is after sending a mail to the webmaster from a hotmail user.
http://www.blog.hemminga.net/B2evoforum/Hotmail2.png
The email mentioned above is received, but the hotmailadress is duplicated.
@Andyell: these images are a side effect of my investigation of your problem. Please stick to Yabba's solution first.
ok edit all files back to original so that the registration complete page loaded I have also tried editing the headers but still no joy with hotmail emails
how can I send a email to hotmail using my hosts sendmail so i can test it for hotmail addresses is there a script to use to test this.
sorry for all the questions
OK created new php file with DW put the above script in the body(is that correct) called the page but no email recieved in hotmail account.
I take it the problem is within the host somewhere. If yes is there a way to correct this
You will know for sure if you change the emailaddress in the above script to one that is not from hotmail and it sends & receives correctly.
If there are still problems, we must find out why. It may be the way hotmail wants to receive the emailaddresses. If I find out more I will post.
Good luck
OK thats not sending mail to any email address but b2evo does send mail to all apart from hotmail
I am sorry. I should have looked more closely. This function from Yabba is not going to send emails out of the box.
But as you stated correctly, you don't need to do this check, since you know the answer. I will see if I can find something from hotmail.
<html>
<body>
<?php
mail( 'you@yourdomain.com', "subject: test", "message: test", 'From: you@yourdomain.com');
echo "Mail should have been sent, check your inbox";
?>
</body>
</html>
A google search on 'hotmail mail not sent' reveils a lot of similar problems.
*edit*
http://winklite.wordpress.com/2006/12/14/how-to-get-hotmail-to-receive-email-sent-via-php/
This works for me @ hotmail :
<?php
$from = 'fred@foo.bar';
$headers['Content-Type'] = 'text/plain;';
$headers[ 'From' ] = $from."\r\n";
$headers ['Sender'] = $from."\r\n";
$headers['Return-Path'] = $from."\r\n";
$headers['X-Sender'] = $from."\r\n";
$headers['Reply-To'] = $from."\r\n" ;
$headers['MIME-Version' ] = '1.0' . "\r\n";
ini_set( 'sendmail_from',$from);
$headerstring = '';
foreach( $headers as $header => $value )
{
$headerstring .= $header.': '.$value;
}
mail( '**********@hotmail.com', 'email demo', 'hello world', $headerstring );
?>
¥
*edit*
The chances are you just need to remove the ."\r\n"'s from the previous post to make it work in evo
Hi yabba
Sorry what file do i edit with the above script
Im dumb ignore that got it now lol this is a new file to test email
It's a standalone script to see if you can send to hotmail ( replace *******@hotmail.com with your test email address );
¥
Still no joy
pm me your hotmail address and I'll send you one from my server and we'll see if that gets through ( you may need to check your spam box )
¥
Hi yabba got email
so could this mean that my host is blocking this or I just have some script wrong
Is there a place to check if my mail is stopped by host as im confused now
I can recieve php mail in hotmail but cannot send it from my host or b2evo
You possibly have something wrong in the script
If you copy and paste the above code and save it as emaildemo.php and upload it ( after changing the hotmail account it's sending to ) then it should work.
¥
I got the email you sent, that went to the junk folder.
But I cant send from my host using that script
how do I check the sendmail program on my host would that be blocking it
It would seem odd that all your other emails get through, unless hotmail has your ip range blocked as a spam source.
Try this, in the same script, replace yourname@hotmail.co.uk with yabbahliberationfront @ the .com version of hotmail ;)
If that doesn't work then pm me ftp details and I'll have a play ;)
¥
:( Today I recieved the return mail
Hotmail are blocking as it might be comprimised or virus infected
Here is the header:
Return-Path: <******@******.org.uk>
Received: (qmail 30665 invoked by uid 48); 5 Feb 2008 04:52:26 -0500
Date: 5 Feb 2008 04:52:26 -0500
Message-ID: <20080205095226.30657.qmail@www4.weycrest.com>
From: root@www4.weycrest.com
X-Additional-Header: /var/www/vhosts/******.org.uk/httpdocs
To: ******@hotmail.co.uk
Subject: email demo
Content-Type: text/plain;From: ******@******.org.uk
Sender: *******@******.org.uk
X-Sender: ******@******.org.uk
Reply-To: ******@******.org.uk
MIME-Version: 1.0
And their response:
Connected to 65.54.244.200 but sender was rejected.
Remote host said: 550 DY-002 Mail rejected by Windows Live Hotmail for policy reasons. The likely cause is a compromised or virus infected server/personal computer. If you are not an email/network admin please contact your E-mail/Internet Service Provider for help. Email/network admins, please visit http://postmaster.live.com for email delivery information and support
Any ideas on how to get round this. :?:
I'd probably be emailing that to my hosts and asking them what's going on ;)
¥
Hi andyell,
Completely as an add-on to ¥åßßå's suggestion you may now try to get my hack (see FAQ) going with a different mailserver.
If you need or want assistance with that, let me know.
Good luck
Hi andyell,
Welcome to the forums.
Yesterday I wrote a Howto on this topic. You find it here [url=http://forums.b2evolution.net/viewtopic.php?t=14205][1.10.3] [2.4.0 rc2] HOWTO: use an external SMTP mailserver[/url].
Do have a look and find out what you can do on your own. If you get stuck, feel free to ask in this topic.
Good luck