Jump to content

Recommended Posts

I have some dump date in my mysql table and i have one real record(my mail address) and it says "Mail was sent successfully" but actually there is aaa@bbb.com.jp (which there is not such mail address)

here is my code so far.

do{	
	$mail = $row_r['mail'];			

	$sending = mail($mail, $mail_header, $body, $header);

	if($sending != 1){
		$flag = 1;
		$query_update = "UPDATE mail_mag SET err = '$flag' WHERE mail = '$mail'";
		$r_update = mysql_query($query_update, $myconn) or die(mysql_error());
	}	

} while ($row_r = mysql_fetch_array($r));

Link to comment
https://forums.phpfreaks.com/topic/145161-is-mail-delivered/#findComment-761898
Share on other sites

You know all those times when you register to a place and don't want to put your real e-mail...so you put in jkdkdfjkl@gobbledygoop.pop  Well, if the mail() function was able to check the validity of an e-mail instantaneous...we wouldn't be able to do such things.

 

The only way around it is to set up a confirmation e-mail script.

Link to comment
https://forums.phpfreaks.com/topic/145161-is-mail-delivered/#findComment-761900
Share on other sites

Well you second option to this fiasco here is to waste resources trying to be secure.

 

You can strip the email of the domain.....PING it and throw an error if the domain is not valid.

You can check the main part of the domain for verification.. i.e the dot com area.  Make sure it's a valid ICANN suffix. (.com, .net, .biz .tv ...etc, etc etc)

You could make the user type their email several times so they don't just type random characters...with an @ symbol

 

Either way though....unless you have them confirm by a link that they received the email....there is no way to tell if the email is real.

Link to comment
https://forums.phpfreaks.com/topic/145161-is-mail-delivered/#findComment-761913
Share on other sites

Well you second option to this fiasco here is to waste resources trying to be secure.

 

You can strip the email of the domain.....PING it and throw an error if the domain is not valid.

You can check the main part of the domain for verification.. i.e the dot com area. Make sure it's a valid ICANN suffix. (.com, .net, .biz .tv ...etc, etc etc)

You could make the user type their email several times so they don't just type random characters...with an @ symbol

 

Either way though....unless you have them confirm by a link that they received the email....there is no way to tell if the email is real.

 

You can also check if the domain name in question has valid MX records using a DNS lookup.

 

getmxrr

Link to comment
https://forums.phpfreaks.com/topic/145161-is-mail-delivered/#findComment-761971
Share on other sites

then how mail services works ? if i send some mail via hotmail or gmail or any other mail service it returns me with an error report if my mail fail ?

 

And so will your mail server used by php. Its just not instantaneous, you also may not even have access to the mail logs.

 

If you have root shell access you can take a look at the mail logs (usually kept within /var/log somewhere), otherwise you might look for a dead.letter file within your ~/ directory.

Link to comment
https://forums.phpfreaks.com/topic/145161-is-mail-delivered/#findComment-763205
Share on other sites

I use PHPMailer, and my advise is you at least should give it try.

 

I do not why I have issues with mail(), I guess because my understanding is that  you have to be running a MTA (SMTP server) locally, maybe someone could confirm this though.

Link to comment
https://forums.phpfreaks.com/topic/145161-is-mail-delivered/#findComment-763248
Share on other sites

I use PHPMailer, and my advise is you at least should give it try.

 

I do not why I have issues with mail(), I guess because my understanding is that  you have to be running a MTA (SMTP server) locally, maybe someone could confirm this though.

 

This is usually the case yes. php's mail function does not support authorization so connecting to a remote smtp server is more difficult.

Link to comment
https://forums.phpfreaks.com/topic/145161-is-mail-delivered/#findComment-763252
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.