Jump to content


Photo

Php mail() function not working?

mail() mail mail function php not working send an email send an automatic email

  • Please log in to reply
6 replies to this topic

#1 roguitar

roguitar

    Rank I Member

  • Members
  • Pip
  • 41 posts

Posted 11 July 2019 - 02:18 PM

Is php mail() function not working today?

This is my base code:

<!-- NO HTML CODE ABOVE -->
<?php
$email = "rogeriobsoares5@gmail.com";
$subject = "Email Test";
$message = "Hello, boy!";


mail($email, $subject, $message, "From: English U.P.<englishup19@gmail.com>\nX-Mailer: PHP/" . phpversion());
sentmessage = true;
?>

<HTML charset="utf-8">
<HEAD>
<TITLE>MAILER</TITLE>
</HEAD>
<BODY>
<?php 
if(isset($sentmessage)){
if($sentmessage == true){
echo "Message sent successfully!";
}
}
 ?>
</BODY>
</HTML>

I've been testing several times today, but I'm not receiving the messages at all. Why is that the case? Would anybody know the answer? Thank you!

 

AN IMPORTANT PIECE OF INFORMATION: It's not working when I send to my gmail accounts, but only when I set $email as my Hotmail account. Why?


Edited by roguitar, 11 July 2019 - 03:39 PM.


#2 wolstech

wolstech

    Rank X Member

  • Root Admin
  • 10,632 posts
  • Gender:Male
  • Location:Pennsylvania

Posted 11 July 2019 - 03:47 PM

Ricky is currently blacklisted by SORBS (which is a very common spam list), so any provider using that spam filter list will flag or refuse the emails. 

 

Also, Gmail typically marks email from our servers as spam anyway. Check to see if it's in your spam bin and choose "Not Spam" if so. After that they'll come through normally for you.


Please do not PM me for support. Posting on our forums lets all of us learn.
Do you play Minecraft? | Server Monitors | And the Dumbass of the Decade award goes to...


#3 sohamb03

sohamb03

    Rank V Member

  • Members
  • PipPipPipPipPip
  • 392 posts
  • Gender:Male
  • Location:India
  • Interests:Web Designing

Posted 11 July 2019 - 04:00 PM

Ricky is currently blacklisted by SORBS (which is a very common spam list), so any provider using that spam filter list will flag or refuse the emails.

Can't it be fixed?

Also, Gmail typically marks email from our servers as spam anyway. Check to see if it's in your spam bin and choose "Not Spam" if so. After that they'll come through normally for you.


Except Cody huh?.... Registration emails arrive normally.

Sayan Bhattacharyya


#4 wolstech

wolstech

    Rank X Member

  • Root Admin
  • 10,632 posts
  • Gender:Male
  • Location:Pennsylvania

Posted 11 July 2019 - 04:21 PM

 

Ricky is currently blacklisted by SORBS (which is a very common spam list), so any provider using that spam filter list will flag or refuse the emails.

Can't it be fixed?

Also, Gmail typically marks email from our servers as spam anyway. Check to see if it's in your spam bin and choose "Not Spam" if so. After that they'll come through normally for you.


Except Cody huh?.... Registration emails arrive normally.

 

That's because Cody doesn't have user accounts on it to get it blacklisted

 

This issue can't really be fixed for the shared IPs. All of our shared IPs have bad reputations in general due to the fact we sometimes host phishing and spam. Sometimes they get blacklisted as well. If we get one delisted, the next time someone sends spam or phishing mail it'll end up listed again. Eventually they won't even let you be delisted, so we try to limit requests for delisting and let the IP's reputation improve so it falls off on its own.

 

If a user really wants to send mail here without facing this issue, buying a dedicated IP is the proper fix. By not sharing with a bunch of spammers, their IP's reputation only reflects what their account sends.


Please do not PM me for support. Posting on our forums lets all of us learn.
Do you play Minecraft? | Server Monitors | And the Dumbass of the Decade award goes to...


#5 roguitar

roguitar

    Rank I Member

  • Members
  • Pip
  • 41 posts

Posted 11 July 2019 - 04:47 PM

 

 

Ricky is currently blacklisted by SORBS (which is a very common spam list), so any provider using that spam filter list will flag or refuse the emails.

Can't it be fixed?

Also, Gmail typically marks email from our servers as spam anyway. Check to see if it's in your spam bin and choose "Not Spam" if so. After that they'll come through normally for you.


Except Cody huh?.... Registration emails arrive normally.

 

That's because Cody doesn't have user accounts on it to get it blacklisted

 

This issue can't really be fixed for the shared IPs. All of our shared IPs have bad reputations in general due to the fact we sometimes host phishing and spam. Sometimes they get blacklisted as well. If we get one delisted, the next time someone sends spam or phishing mail it'll end up listed again. Eventually they won't even let you be delisted, so we try to limit requests for delisting and let the IP's reputation improve so it falls off on its own.

 

If a user really wants to send mail here without facing this issue, buying a dedicated IP is the proper fix. By not sharing with a bunch of spammers, their IP's reputation only reflects what their account sends.

 

Now I get it. Well, I can't remember exactly, but once I messed up with the settings in my gmail accoount and I'd chosen an option which automatically and systematically would downgrade the security of my account. I guess I did it in order to transform it into an automatic sender, because I have another website hosted at another server (not here, but other free website hosting company). I did it, because they don't provide this sorta "mailing" service. Anyways, as I can't remember exactly the wonderful stuff I'd done, I just dunno how to reverse it. And I don't know either if your system may have detected it as phishing attempt. Anyways, you know, thank you.  :wacko:  :rolleyes:  


Edited by roguitar, 11 July 2019 - 06:34 PM.


#6 sohamb03

sohamb03

    Rank V Member

  • Members
  • PipPipPipPipPip
  • 392 posts
  • Gender:Male
  • Location:India
  • Interests:Web Designing

Posted 11 July 2019 - 04:48 PM

@wolstech: Yep that's true....I had sent u a PM ....I edited some details so please check it out.

EDIT: @roguitar: Please remove the slang word from ur post... It's not allowed here.

Sayan Bhattacharyya


#7 roguitar

roguitar

    Rank I Member

  • Members
  • Pip
  • 41 posts

Posted 11 July 2019 - 06:35 PM

@wolstech: Yep that's true....I had sent u a PM ....I edited some details so please check it out.

EDIT: @roguitar: Please remove the slang word from ur post... It's not allowed here.

Ah, ok. Sorry for that and thank you!







Also tagged with one or more of these keywords: mail(), mail, mail function, php, not working, send an email, send an automatic email

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users