Jump to content

Email not sending or arrives late


Lone_Ranger

Recommended Posts

// ---------------- SEND MAIL FORM ----------------

 $to=$username;
 $subject="SentUAMessage - Verify Account";
 $header= "MIME-Version: 1.0" . "\r\n";
 $header .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
 $header .='from: SentUAMessage <[email protected]>' . "\r\n";

 $message="<html><body><div align=center>
	<table border=1 width=30% cellspacing=0 cellpadding=0 bordercolor=#000000>
		<tr>
			<td height=1 valign=top>
			<table border=0 width=100% cellspacing=0 cellpadding=0>
				<tr>
					<td bgcolor=#008000 height=1 valign=top></td>
				</tr>
				<tr>
					<td height=1 valign=top><img src=http://www.sentuamessage.com/emailheader.jpg></img></td>
				</tr>
				<tr>
					<td bgcolor=#008000 height=1 valign=top></td>
				</tr>
			</table>
			</td>
		</tr>
	</table>
</div>
<div align=center>
	<table border=0 width=51% cellspacing=0 cellpadding=0>
		<tr>
			<td> </td>
		</tr>
		<tr>
			<td height=1 valign=top>
			<table border=1 width=100% cellspacing=0 cellpadding=0 bordercolor=#000000>
				<tr>
					<td height=1 valign=top>
					<table border=0 width=100% cellspacing=0 cellpadding=0>
						<tr>
							<td height=1 valign=top><img src=http://www.sentuamessage.com/emailheadertop.jpg></img></td>
						</tr>
						<tr>
							<td height=1 valign=top>
							<h3 align=center><b>Your Confirmation Link</b></h3>
							<table border=0 width=100% cellspacing=0 cellpadding=0>
								<tr>
									<td width=6 height=1 valign=top> </td>
									<td height=1 valign=top><p>Click on this link to activate your 
									account:</p>";
$message.="<p align=center><b><a href=http://www.sentuamessage.com/regconfirmation.php?passkey=$confirm_code>Confirm Reigstration</a></b></p>";

$message.="</td>
									<td width=6 height=1 valign=top> </td>
								</tr>
							</table>
							</td>
						</tr>
					</table>
					</td>
				</tr>
			</table>
			</td>
		</tr>
	</table>
</div></body></html>";

 $sentmail = mail($to,$subject,$message,$header);

I made a verification system and the code is meant to be emailed to the user aka $username field where the email of the user is entered.

 

I had tested this and realised on my Hotmail that either the email would arrive delayed, not arrive at all or would come into the Junk mail.

 

How do I make it that it is more consistent and actually arrive to my users?

 

 

Link to comment
https://forums.phpfreaks.com/topic/287244-email-not-sending-or-arrives-late/
Share on other sites

It has always been an issue and most likely will never change.

 

First you can try to join hotmails junk reporting program

https://support.msn.com/eform.aspx?productKey=edfsjmrpp&ct=eformts&scrx=1

never send more than 50 emails in a minute to hotmail

 

sending the correct headers, possibly optional headers

bad or mismatched html

SMTP server blacklisted or a bad reputation, use an authorized SMTP email server

you don't pay the recieving email servers enough to ensure they get through

try to make sure popular filtered words are not in your messages

problems with your host?

are too many being sent at one time?

add unsubscribe links

add email antispam solutions

 

You can try using phpmailer

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.