[FREE] My SMF Forum does not send any e-mails

Started by kostis007, July 08, 2014, 01:46:40 PM

Previous topic - Next topic

kostis007

hello well as the title says i have problems with e-mails..when someone registers i get the error
Unable to send mail to the email address '[email protected]'

i don't know what to do or how to resolve it.. i cant't send any mail even if i try too from forum , i mean it is not only a registration problem

kat

Welcome to the ol' forum, Kostis!

Anything relevant in your error-logs?

Asked your host?

kostis007

hello, and thanks for your reply ! Well i am actually the host , this is a dedicated server running window server 2008 so i manually installed first php , them the forum..i saw the problem was ringing for smtp so i installed it too..but the problem still exists..basically i got 2 erros..the first one is this


Apply Filter: Only show the error messages of this URLhttp://l2diamond.eu/forum/index.php?action=register
2Apply Filter: Only show the errors with the same messageUnable to send mail to the email address '[email protected]'


and the second one is but i dunno it those are related i am now learning about php so i am in deep trouble over here and would appreciate any kind of tip/help!
thanks in avance !


Apply Filter: Only show the error messages of this URLhttp://l2diamond.eu/forum/index.php?action=register2Apply
Filter: Only show the errors with the same message2: mail() [<a href='function.mail'>function.mail</a>]: SMTP server response: 501 5.5.4 Invalid AddressApply Filter: Only show the errors from this file File: C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/forum/Sources/Subs-Post.php
Line: 765



and it has this when i open subs-post.php





745:         if (empty($mails_this_minute) || time() > $last_mail_time + 60)
746:            $new_queue_stat = time() . '|' . 1;
747:         else
748:            $new_queue_stat = $last_mail_time . '|' . ((int) $mails_this_minute + 1);
749:   
750:         updateSettings(array('mail_recent' => $new_queue_stat));
751:      }
752:   
753:      // SMTP or sendmail?
754:      if ($use_sendmail)
755:      {
756:         $subject = strtr($subject, array("\r" => '', "\n" => ''));
757:         if (!empty($modSettings['mail_strip_carriage']))
758:         {
759:            $message = strtr($message, array("\r" => ''));
760:            $headers = strtr($headers, array("\r" => ''));
761:         }
762:   
763:         foreach ($to_array as $to)
764:         {
==>765:            if (!mail(strtr($to, array("\r" => '', "\n" => '')), $subject, $message, $headers))
766:            {
767:               log_error(sprintf($txt['mail_send_unable'], $to));
768:               $mail_result = false;
769:            }
770:   
771:            // Wait, wait, I'm still sending here!
772:            @set_time_limit(300);
773:            if (function_exists('apache_reset_timeout'))
774:               @apache_reset_timeout();
775:         }
776:      }
777:      else
778:         $mail_result = $mail_result && smtp_mail($to_array, $subject, $message, $headers);
779:   
780:      // Everything go smoothly?
781:      return $mail_result;
782:   }
783:   
784:   // Add an email to the mail queue.
785:   function AddMailQueue($flush = false, $to_array = array(), $subject = '', $message = '', $headers = '', $send_html = false, $priority = 3, $is_private = false)

kat

The first error... Is it always that same address? If so, I assume it's a fake.

The second one... That suggests, to me, (As you're using a Windoze server) that the "maill()" function doesn't accept email addresses such as:

name <email@host.com>

You need to change them to simpler ones, like this:

email@host.com

kostis007

well thanks for your fast answer !! i changed the 2nd error to simpler and it is ok now thanks ! as for the first e-mail no it is not a fake i tried this yo many of my e-mails too and does not send nothing...i tried to yahoo , gmail , windowslive, freemail and hotmail and nothing

kat

Well, let's see how you go, having changed that setting. You might be OK, now. :)

You know... This was one of those "How the heck did I know that?" things. It just suddenly came to me and I have no idea where it came from. :)

Magic, huh?

Matthew K.

Out of curiosity, make sure the webmaster email address in Server Settings is not @yahoo.com...I've seen that cause issues in the past.

kostis007

well i managed to fix that but another error appeared and i dunno how to fix it. the error is this

Couldn't get mail server response codes     well that means that some form is written down wrong the e-mail or the password and as i get it i have not understood well how smtp does work....in admin panel in forum in maintenance tab i chose smth rather than php and then : on smtp server i put : www.myhost.something
smtp port : myport that tested works and is opened , and then i used on username and password my e-mail username and password which is a gmail. am i right? or i did something terribly wrong? because the way i see the error is that i read that there is smtp installed successfull but something blocks it from sending back e-mails..... any ideas?

Sir Osis of Liver

You need to enter the smtp server name, username, and password for your host mail server.  Nothing to do with gmail.  If you don't have that info, look in your cpanel, or contact host support.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

kostis007

well since i use gmail  i used this tutorial over here
hxxp:email.about.com/od/accessinggmail/f/Gmail_SMTP_Settings.htm [nonactive]
and i used those setings plus my gmail (email ) and my password.....but again a new error occured that as i see has no solution

Ran into problems sending Mail. Error: 534 5.7.14 hxxp:support.google.com/mail/bin/answer.py?answer=78754 [nonactive] gq4sm27292422wib.8 - gsmtp

if we are able to solve this one ( i tryed the methods that are recommended on hxxp:support.google [nonactive] but nothing ) i think we have solved the problem

ZerK

last time i checked the smtp server in their docs was outdated.

ssl://smtp.googlemail.com
port 25
your mail
your pass

kostis007

yes  i found out too a couple of minutes before and those worked perfectly ! thanks guys appreciated you gave me motive and helped me get the right mindset over here !! a mod can LOCK the topic everything works fine finally ! :)


Sir Osis of Liver

Why would anyone use a predatory mail service like gmail when they can send forum email via host mail server?

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor

1. Overly limited host settings
2. Self hosting and don't want to/aren't able to configure postfix themselves
3. Using a service like CloudFlare and want to obfuscate the originating IP address (to prevent miscreants just bypassing CloudFlare entirely)

Advertisement: