Jump to content

More questions regarding sending emails from a webpage.


Recommended Posts

Some of you may know that I have posted this issue a few times.  The most recent, it was recommended that I switch to an emailing library.  Currently I am using phpmailer (SENDMAIL?)

 

The problem is we are trying to use a webform to send out bulk emails.  Everything seems ok.  But some people still do not get messages and I think I have it narrowed down to the domain they are registered to.

 

For example.

 

The boss and I are on @gmail.com and we get every message.

 

One employee is on @yahoo.com and she got the messages.

 

I'm still waiting to hear from the one employee that is on @sbcglobal.net, but she had to forward a message to the two on @att.net the other day so I think she is getting them.

 

The 2 employees with @att.net do not get the messages.  They think they use to get them, but its hard to tell whether those messages where sent from the boss from gmail or from the web form I have built.

 

I find it hard to believe it's the code, if you want me to post it I will, but people are getting the messages.  Just some do not.  Wouldn't that prove that the code is working and that there is some other step or middle man that is causing the problem? 

 

I have asked that they check spam folders and nothing there.

 

What should be my next step?  We need 100% messages sent.  We are not only sending emails to employees, but also the few hundred clients we have.  We cannot be sending emails on top of emails asking for confirmation that they got it.  We currently are not using our own POP/SMTP server, just the default shared hosting server we are on through godaddy and the email library that I am assuming works with that.

 

That will be my next step.  Pay for a dedicated email server.  And that's only cause I feel I'm out of options.  What else can I do? 

 

Thanks

 

Nick

An update:

I called at&t and the lady confirmed that there is a higher level filter that blocks 3rd party emails.  The individual customer would need to call and have this turned off.

 

Is there any other way to send an email from a 3rd party webform that would not get blocked?

 

We don't have the liberty of asking customers to call their providers.

 

Thanks

Nick

three of the most common problems with emails being 'dropped' are -

 

1) setting the From: header in the email to be that of the recipient, not of the sender, which is YOUR sending mail server

 

2) by not having appropriate DNS zone records at your sending mail server that allow the receiving mail servers to determine that the email is authorized to be sent by your sending mail server

 

3) your mail server has been flagged as sending spam and you would need to have it white-listed at the specific receiving mail servers.

 

for the case of the From: header, if the domain in the from address is the same as the receiving mail server, the receiving mail server KNOWS it didn't send that email to itself and so it simply discards it. the email address in the From: header must at least have a domain that corresponds to your sending mail server.

 

for the case of the DNS records, you generally need MX, A, SPF (Sender Policy Framework), and reverse lookup records at your sending mail server so that the receiving mail server can check that the mail server that is trying to send to it corresponds to where the email says it is coming from.

 

most of the major ISP's have a 'postmaster' FAQ that lists the things they check and what their white-list procedure is.

 

once you get your email to work for one of the more stringent ISP's, it should work with most of them.

Thank you for the fast reply!

 

Let me check my understanding.

 

Our domain is marcomtechnologies.com

 

There is 2 places a message could be sent out.

 

One place sends it from admin@marcomtechnologies.com

 

the other from the registered email for that member.

So, for example if I send an email, its from njdubois@gmail.com

 

In a recent post about this problem it was made clear that it has to come from a real domain, and that is when we switched the other to @marcomtechnologies.com

 

Your number 2 point, wouldn't that be on godaddy, and you would hope they had all that setup correctly?

 

Number 3 makes sense.  Could it be that it's blocked by default?  It is very possible that the emails have been flagged as spam, they are automated after all.

 

I have another question based on your reply.  Say salesperson B flags a message from us as spam.  Anyone else on that email provider would them have those messages marked as spam by default with out them having to take any actions?

 

I'm going to contact godaddy about your second point.

 

Thanks again for the fast reply.

 

Nick

for the DNS zone records, those are yours to setup and they are specific to your domain name (though your web host should probably have macro's setup so that any time a domain is added it creates records for that domain.)

 

the gist of this is even through you are using your web host's shared mail server, you set up DNS zone records that treat it as though it is your own mail server, so that anyone/anything looking at it from the outside thinks it is your own dedicated mail server.

Edited by mac_gyver

I'm still having issues with this.

 

Anyone with an email address with att.net gets messages from the web form on my page blocked.  BUT, if I use godaddys email services, and send an email from the web mail page from the address admin@marcomtechnologies.com, it works and the person gets the email.

 

AT&T has the ability to get your domain white listed.  But they are asking for information from a Non-Delivery-Report (NDR?) That I am not getting.

 

I don't know how to set that up?  I know that in the code, I have the reply to, and the from set correctly.  It's from me, njdubois@gmail.com.  But I'm not getting any NDR?

 

How do I go about looking into these DNS zone records?  Is that something I should call godaddy about?  I know everything is setup right cause I can send emails to everyone else and they get them no problems.

 

Thanks

Nick

I have sent a message to a few others I know with @att.net email address and it is confirmed they are not getting them.

 

I'm consirned that there is an automated reply that I should be getting stating that the message was blocked, or maybe it's another error all together.

 

I tried to send an email to an over the top invalid address and still got no reply.

 

So this is the code that sends an email:

	try {

	
		if(!PHPMailer::validateAddress($to)) {
			throw new phpmailerAppException("Email address " . $to . " is invalid -- aborting!");
		}

		$mail->isSendmail();
		$mail->addReplyTo($_SESSION['member_email'], $_SESSION['member_email']);
		$mail->From       = $_SESSION['member_email'];
		$mail->FromName   = $_SESSION['member_email'];
		$mail->addAddress($to, $to);
		$mail->Subject  =$MSG_row['msg_subject'];
		//$body = "<<<'EOT'";
		$body = $email_message;
		//$body .= "EOT";
		$mail->WordWrap = 80;
		$mail->msgHTML($body, dirname(__FILE__), true); //Create message bodies and embed images

		try {
			$mail->send();
			$results_messages[] = "Message has been sent to " . $to . ', ';
		}

		catch (phpmailerException $e) {
			throw new phpmailerAppException('Unable to send to: ' . $to. ': '.$e->getMessage());
		}
	}

	catch (phpmailerAppException $e) {
		$results_messages[] = $e->errorMessage();
	}

What do I need to change so that I get these error messages?

 

I'm using PHPmailer if that is needed information?

 

Thanks so much for the help all, you have guided me to look at things I'd never have thought of.  I hope the above code will help you point out what I am doing wrong.

 

Thanks!!

Nick

More email problems as fresh as today!  Client sent an email at 6:23 and I never got it.

 

I was on the phone with godaddy and the rep pointed out that somewhere in my code I need to setup the relay?

 

Somewhere in the code above, I need this "relay-hosting.secureserver.net" Where would this go?

 

Thanks

Nick

 

[EDIT]

found this

http://stackoverflow.com/questions/10984352/phpmailer-on-godaddy-server-setup-correctly

[/EDIT]

Edited by njdubois

An update for anyone following this post.

 

As mentioned I have talked with godaddy.  I had to rep confirm that all settings are correct in php.ini and in the godaddy control panel.  I also had her look at my code.  She informed me that the only problem she saw was the lack of including the relay server.  Before I found the stack overflow page, I had went to the PHPmailer website to look for assistance, and on that page they had a Blacklist test.  I tested our domain, and it's IP and it came back clear.  Not satisfied I googled black list test and tested a few more times.  Everything is clear.

 

I read on that stackover flow link that the email HAD to be from the domain.  So I have setup an email address admin@marcomtechnologies.com and the email is now coming from that address.  Still, att.net are not getting emails.

 

I have also tried to send an email to a friend I have with an @att.net address and he confirmed that he did not receive the email.

 

So we are not blacklisted, and I have the relay server code added and the att.net address are still not getting the emails.  The godaddy rep also made a point of saying it shouldn't be hit or miss.  It either sends emails, and everything is working, or it doesn't send emails.  Well, most emails go out, why are some not?  I have gotten emails many many times, why did I not get the message this morning?

 

I can't stress enough that @att.net not getting the messages is just one part of the bigger issue.  I normally get the emails, and didn't get one today.

 

I'm lost.  I have no idea whats going on, and I don't know what I should even be researching cause the code "works."  I am trying to get in contact with another programmer that is far more advanced than I to arrange a meeting so I can walk him through the problem and show him the code.  I think that is my only option at this point.

 

Here is the updated code with the relay server line:

	try {

	
		if(!PHPMailer::validateAddress($to)) {
			throw new phpmailerAppException("Email address " . $to . " is invalid -- aborting!");
		}

	       $mail->IsSMTP(); // Using SMTP.
	       $mail->CharSet = 'utf-8';
	       $mail->SMTPAuth = false; // Enables SMTP authentication.
	       $mail->Host = "relay-hosting.secureserver.net"; // SMTP server host.
	
		$mail->isSendmail();
		$mail->addReplyTo("admin@marcomtechnologies.com");
		$mail->From       = "admin@marcomtechnologies.com";
		$mail->FromName   = "admin";
		$mail->addAddress($to, $to);
		$mail->Subject  =$MSG_row['msg_subject'];
		//$body = "<<<'EOT'";
		$body = $email_message;
		//$body .= "EOT";
		$mail->WordWrap = 80;
		$mail->msgHTML($body, dirname(__FILE__), true); //Create message bodies and embed images

		try {
			$mail->send();
			$results_messages[] = "Message has been sent to " . $to . ', ';
		}

		catch (phpmailerException $e) {
			throw new phpmailerAppException('Unable to send to: ' . $to. ': '.$e->getMessage());
		}
	}

	catch (phpmailerAppException $e) {
		$results_messages[] = $e->errorMessage();
	}

Is anything else I can do?  What should be my next troubleshooting process?

 

Thank you so much for all your help.  I hope to have this resolved asap!

 

Nick

Ok, I looked up Sender, and added it to my code but I am still not getting the bounced back NDR.  I had also read about this and that'ss when I added the addReplyTo, From, and FromName.

 

My code now looks like this:

	try {

	
		if(!PHPMailer::validateAddress($to)) {
			throw new phpmailerAppException("Email address " . $to . " is invalid -- aborting!");
		}

	       $mail->IsSMTP(); // Using SMTP.
	       $mail->CharSet = 'utf-8';
	       $mail->SMTPAuth = false; // Enables SMTP authentication.


		$mail->addReplyTo("admin@marcomtechnologies.com");
		$mail->From       = "admin@marcomtechnologies.com";
		$mail->FromName   = "admin";

	       $mail->Host = "relay-hosting.secureserver.net"; // SMTP server host.
		$mail->Sender = "admin@marcomtechnologies.com";
		$mail->isSendmail();
		$mail->addAddress($to, $to);
		$mail->Subject  =$MSG_row['msg_subject'];
		//$body = "<<<'EOT'";
		$body = $email_message;
		//$body .= "EOT";
		$mail->WordWrap = 80;
		$mail->msgHTML($body, dirname(__FILE__), true); //Create message bodies and embed images

		try {
			$mail->send();
			$results_messages[] = "Message has been sent to " . $to . ', ';
		}

		catch (phpmailerException $e) {
			throw new phpmailerAppException('Unable to send to: ' . $to. ': '.$e->getMessage());
		}
	}

	catch (phpmailerAppException $e) {
		$results_messages[] = $e->errorMessage();
	}

And as an added bonus, this is the header information from an email I sent myself that came through, maybe there is a clue:

                                                                                                                                                                                                                                                               
Delivered-To: njdubois@gmail.com
Received: by 10.216.93.74 with SMTP id k52csp159461wef;
        Thu, 21 Nov 2013 15:09:06 -0800 (PST)
X-Received: by 10.68.6.99 with SMTP id z3mr8877892pbz.114.1385075345214;
        Thu, 21 Nov 2013 15:09:05 -0800 (PST)
Return-Path: <admin@marcomtechnologies.com>
Received: from p3nlsmtp17.shr.prod.phx3.secureserver.net (p3nlsmtp17.shr.prod.phx3.secureserver.net. [72.167.234.242])
        by mx.google.com with ESMTP id pl10si18060864pbc.268.2013.11.21.15.09.04
        for <njdubois@gmail.com>;
        Thu, 21 Nov 2013 15:09:05 -0800 (PST)
Received-SPF: neutral (google.com: 72.167.234.242 is neither permitted nor denied by best guess record for domain of admin@marcomtechnologies.com) client-ip=72.167.234.242;
Authentication-Results: mx.google.com;
       spf=neutral (google.com: 72.167.234.242 is neither permitted nor denied by best guess record for domain of admin@marcomtechnologies.com) smtp.mail=admin@marcomtechnologies.com
Received: from p3nlhg252.shr.prod.phx3.secureserver.net ([173.201.196.40])
	by p3nlsmtp17.shr.prod.phx3.secureserver.net with 
	id sP941m00B0smbvR01P94KN; Thu, 21 Nov 2013 16:09:04 -0700
Received: from p3nlhg252.shr.prod.phx3.secureserver.net (localhost [127.0.0.1])
	by p3nlhg252.shr.prod.phx3.secureserver.net (8.14.4/8.12.11) with ESMTP id rALN94TW032664
	for <njdubois@gmail.com>; Thu, 21 Nov 2013 16:09:04 -0700
Received: (from club1687@localhost)
	by p3nlhg252.shr.prod.phx3.secureserver.net (8.14.4/8.14.4/Submit) id rALN946F032661;
	Thu, 21 Nov 2013 16:09:04 -0700
X-Authentication-Warning: p3nlhg252.shr.prod.phx3.secureserver.net: club1687 set sender to admin@marcomtechnologies.com using -f
Date: Thu, 21 Nov 2013 16:09:04 -0700
To: "njdubois@gmail.com" <njdubois@gmail.com>
From: admin <admin@marcomtechnologies.com>
Reply-To: admin@marcomtechnologies.com
Subject: test
Message-ID: <87c844340e5d52b295312e051874b0f8@marcomtechnologies.com>
X-Priority: 3
X-Mailer: PHPMailer 5.2.7 (https://github.com/PHPMailer/PHPMailer/)
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="b1_87c844340e5d52b295312e051874b0f8"
Content-Transfer-Encoding: 8bit

--b1_87c844340e5d52b295312e051874b0f8
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

test


--b1_87c844340e5d52b295312e051874b0f8
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit

<html><body>test</body></html>



--b1_87c844340e5d52b295312e051874b0f8--

It states: Return-Path: <admin@marcomtechnologies.com>

 

Which is correct!  I know I'm sending a test email to a bad address cause when I send an email from inside gmail to the same address I get the NDR immediately.

 

Thank you so much for trying!  Keep the recommendations coming!  I really really appreciate it!!!!

 

Nick

Nice thread. The quest for deliverability is never-ending. Kudos to you for pushing so hard for it.

 

SPF is an under-appreciated protocol. I would definitely look into it if you have the ability to publish records (it's not too hard to do). The official SPF lists are at openspf.org, I think ... I've found them to be quite helpful most of the time.

I'm not sure what this SPF lists are, but I assure you I will look into it!

 

Thanks for the support, this just keep getting weirder and weirder.

 

As mentioned, I have setup an email account with godaddys webmail.  While testing, I tried to send an email from inside godaddys webmail page to a obviously bad email address and guess what, No non delivery reprots?!?!?!

 

I'm so confused now.

SPF is a protocol: "Sender Protection Framework", if I remember right off the top of my head.  The "lists" I refer to are the email lists at openspf.org, where some helpful sysadmins and others hang and answer questions about implementation of the protocol.

Also "IIRR" (if I remember right - or IIRC [correctly!]) ... the SPF protocol basically consists of adding an additional DNS record to your domain's zonefiles, after which the MTA's on the 'Net will "do the right thing" and trust that mail coming from that server is actually being sent by your domain, which *should* help with deliverability.

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.