‘Great minds’ and all that 8)
Kevin and Redscouse… Thanks for you comments. This process was a long one and I did not want to mix
up Jeff as he appears to be a newbie… It is working for him as far as code goes. I think his only issue is
the Hotmail account at this point. So, the last few messages were about how to debug those issues.
He emptied out the posted variables so that nothing was put into the fields when the page first is opened.
Then, the posted values are pulled and displayed. So, when the email is sent, it contains the valid new
data that is loaded and not other older data stays in fields. And, yes, short-code versions are good if you
know how to handle it. Jeffery will learn how to do this at some time. I do think it is easier to understand
doing it his way, though. Especially if you are showing the code to others.
As always, nice to hear from others on the site. A good mix of info and thoughts are good for programming!
CYA in the bitstream…
If Jeff is a newbie, this is probably the best time to teach him to do it properly - not just ‘get it working’
I seem to recall having an issue sending to a hotmail account using php’s mail() function - turns out they block any domains with no SPF record, you can create one here.
Hope that helps,
Red
Thanks, Redclouse !
Jeffery was supposed to be testing it with a Yahoo or Gmail account, but, he has not responded back
as yet.
So, Jeffery, did you see Redclouse’s reply with the link about fixing Hotmail emails from PHP???
Hope you did…
And, yes, perhaps doing things correctly should be in every post…
Never heard of him. 8)
He is the Santa version.
LOL, sorry Redscouse… Fly’n Fingers…
Sorry, I didn’t notice the answers… Somehow I missed a notification…
I seem to recall having an issue sending to a hotmail account using php's mail() function - turns out they block any domains with no SPF record, you can create one here.
I’ve visited the link a couple of times, keeps saying System Maintenance in progress. Please try again later.. So I can’t use it. Thanks for helping me though!
I’ve tested the page with several emailaddresses:
[email protected] (that’s the one which receives the confirmation, which is used in the code)
[email protected] (just created a new one)
[email protected]
[email protected]
[email protected]
All the times an email was sent to [email protected]. So I always receive a copy, this works.
If I use [email protected] as visitor email:
Everything works perfect.
If I use [email protected] as visitor email:
No email received on hotmail. Spambox is empty. An error is sent to my server.
If I use [email protected] as visitor email:
No email received on GMail. Spambox is empty. No error is sent to my server.
If I use [email protected] as visitor email:
Email received on Yahoo, not in inbox but in spamfolder. No error is sent to my server.
So the problem is obvious the structure of the email, the way it is build, because it’s recognized as SPAM by most common mail providers.
before i found out about the hotmail spf thing, the workaround i used was to create a mailbox on my server which auto forwarded to the hotmail account.
Then using php mail() i’d send to the account on my server (then let it do it’s thing forwarding the message on to hotmail)
Rough, but works.
Red
Jeffery,
If a few email addresses work, then, most likely, you do not have your server’s SMTP set up correctly.
What server host are you using? If it is your own server, you can set up the SMTP using your own email
system instead of your server’s.
If you are using a hosting system, then you should ask them why some of your emails do not send.
It is an SMTP set up issue or you are using invalid headers for your PHP mail system.
Hope that helps…
Happy holidays!
Got back from christmasholidays, straight back to my mail issue… This site from microsoft’s still down. Can’t try this solution. I’m using a hosting system. I tried to change the headers, I’ve set them to text/html, still with the same results.
The only headers I’m using are:
[php]$email_headers = “From: my name”."\r\n";
$email_headers .= “Reply-To: “.$replyTo.”\r\n”;
$email_headers .= “MIME-Version: 1.0”."\r\n";
$email_headers .= “Content-Type: text/html; charset=utf-8”."\r\n";[/php]
Beneath those headers the message’s loaded.
Well, those look good to me. Not sure what link you are talking about at MS that is down.
I still think it is a “REDIRECTION” problem. Most servers have protection that does not allow a user
to send messages to them redirected from another server. They do check the incoming message’s
sending server against the return address. This is to protect servers from spammers. It might be
the issue. I spent about 30 seconds with our friend “Google” and found this fix for it. It is actually
a fix for just the error#RFC-5322, but that is most likely your problem. Since you never reviewed your
server’s mail logs as we suggest, I bet it is that error.
To fix it, try changing your header to use this format instead of yours:
$headers = “From: my name [email protected]” . “\r\n”;
This tells the Hotmail’s mail server that the message is directly from you not from an unknown address.
In that way if they have any issues, they know who mailed the message. Hot that works for you!
OH, also, if you need the reply to go somewhere else, make sure the reply-to is accurate…
[member=43746]ErnieAlex[/member] ,
You hit it right here:
Since you never reviewed your server's mail logs as we suggest
This is obviously a server configuration situation. The error/mail logs will clearly show what is going on.
Yep, Kevin! I agree. But, I don’t think he understands how to read them. I did post how to do it, but…
Also, I did some further research and found that the formatting of the FROM: header will most likely fix it.
It was on several sites as the solution. Seems that Hotmail likes to know of the real sender and not just
the reply-to address.
Jeffery, try that fix first. If it fails, read back to where I told you how to read your error logs. Good luck!
Yep, it took 53 Replies and 882 Views, but that fixed the problem. I’ve added the email address to the FROM part, received the version on hotmail immediately!
But, I don't think he understands how to read themI am kind of a newbie on this kind of stuff. Want to take some time to understand all of this part, so yeah, I don't know (yet) how to read it. For now this doesn't matter, I'm really happy that the issue's solved! Thanks again for putting so much time and effort to help. It's great to see you guys helping other people, particular you ErnieAlex, you've been a great help to me!
I am so very happy you solved… Glad I could help. Thanks for the Karma, too.
Sorry it took so long. Sometimes it is hard to locate the solution due to not totally understanding the
errors or problems. I do bet your server showed the email-server error-log with the RFC error in it.
That would have saved us a lot of time… But, that’s why we are, to help !!!
CYA in the BITSTREAM!!! I will mark this solved!
Happy New Year…
I would say it does matter and of somewhat importance! Them logs can save massive headaches, not to mention time. Time like 53 posts, 882 views
Joking aside, open them up, learn to understand them (they’re not hard really) and they provide the answer to most of your coding problems, the others will be solved here 8)
Red