Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




Emails Blocked By Certain Mail Hosts? (mail() Function)


I'm using mail($address,$subjectheading,$message,"From:
me@mysite.com") to send emails from my site. For the most part, it
works okay (for example, I receive the mail in my Yahoo box). But when
I check my university email, the message is not delivered. I thought
maybe it was because I had included my web address in the subject
heading and that it was being filtered out, but I removed that from
the subject and it still fails to get through. I'm making a wedding
site for some friends now and they want to be able to email everyone
on their guest list at once, but I'm afraid the same will happen to
some of these addresses as well. Any comments/suggestions on what may
be blocking the mail and how I can get around it? I'm not trying to
send out any kind of mass ad mailings or anything. Just to people on a
mailing list for this site.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Using Mail() - Get Lots Of Blocked Emails
I am using the mail() function but many times the emails do not make it to their recipient...

I see this happen almost 100% of the time to hotmail.com and aol.com accounts.

Is there a way to get these emails through?

This is not for spam, it is for automatic notifications that the recipient requests.


... well I guess this does sound like spam, but anyways it is for sending tracking information from my ecom site when orders ship out.

Does anyone know a better way to do this?

Mail() Function Sending Emails Trapped By IMF
I am using the simple mail() fucntion in a php script but the emails
that are being generated and being trapped by Microsoft Exchange server
2003 Inteligent message filter as having an SCL rating of 7 or 8, the
highest possible being 9.

This is causing me problems getting the emails delivered to people!

Mail() Gets Blocked By Hotmail
I have a few systems that rely on the php mail function. One really big problem I'm having is I'm always blocked in Hotmail and marked as "junk mail". Does anyone know a solution to this? See below for my headers:

# Common Headers
 $eol = "
";
 $headers .= 'From: <'.$fromaddress.'>'.$eol;
 $headers .= 'Reply-To: <'.$fromaddress.'>'.$eol;
 $headers .= 'Return-Path: <'.$fromaddress.'>'.$eol;    // these two to set reply address
 $headers .= "Message-ID: <".$now." TheSystem@".$_SERVER['SERVER_NAME'].">".$eol;

Mail() Php Blocked As Spam
I created a simple php mail() function with attach. The problem is that I´m receiving the mails as spam, I already tried everything, maybe somebody could give me a help, my headers:

$remetente = "$nickuser"."@yachtbrasil.com.br";
$nome_resposta = "$nickuser";
$headers = "MIME-Version: 1.0".$eol;
$headers .= "From: $nome_resposta <$remetente>".$eol;
$headers .= "Reply-To: $nome_resposta <$remetente>".$eol;
$headers .= "Return-Path: $nome_resposta <$remetente>".$eol;
$headers .= "Content-type: multipart/mixed; boundary="$mime_boundary"".$eol;
$headers .= "Message-ID: <".$now." TheSystem@".$_SERVER['SERVER_NAME'].">".$eol;
$headers .= "X-Mailer: PHP v".phpversion().$eol;

Mail() Blocked By Spam Filter
I never had problem with this PHP page with mail() function with at
least 5 different servers, but email sent through the server of this
"T" company tends to get blocked by spam filters. I tested with my
different email accounts and these are the results.

* The mail is delivered to the "Inbox" of my AOL account.
* The mail is delivered to the "Bulk Mail" folder of my hotmail and msn
accounts.
* The mail is delivered to the "Spam" folder of another account of
mine.
* The mail is not delivered to any of my two university accounts.

One thing I noticed is that this "T" company hasn't setup the "From"
section, unlike the other servers that I worked with before, so the
mail is coming from "Nobody" <nobody@________>. I suggested the tech
person of the company update the "php.ini" file, but he doesn't admit
that's the issue. I tried manually adding the From with PHP coding
with "$headers," but it didn't make any change.

Mail() Only Works With Trusted Hosts/domains
I have a dedicated linux web server and I am trying to use the PHP mail()
function to send emails any site visitor that requests one. This works only if the visitor has an email account on the box.

If not then the email request fails. I think this must be something to do with relaying and I have been entering domains and hosts (such as "localhost") to get the script to trust the source of the email request and relay it. Unfortunately I have not had any success.

Mail() [function.mail]: SMTP Server Response: 550 Not Local Host Gmail.com
I do a mail() and get:

Warning: mail() [function.mail]: SMTP server response: 550 not local host gmail.com, not a gateway in C:xamppxampphtdocs estsitemail.php on line 7


<?php
ini_set("SMTP","rlwatkins.com");
ini_set("sendmail_from","hunter@rlwatkins.com");
mail("huntercjcarroll@gmail.com","hello me","spamtastic","From: hunter@rlwatkins.com");
?>

what is wrong with this, how do i set it so that i can send to something other than localhost?

Warning: Mail() [function.mail]: SMTP Server Response: 550 5.7.1
I'm making e-mailing with php script and i setup mailtraq mailserver this thing is just a lil confusing to me first thing i want to know if i can use apache instead of this as mail server second when i wrote my script with that mail function i received an error this is it :

Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for monalisa20042006@yahoo.com in D:wampwww1stmail.php on line 2

what's that mean if this means that the mail server not configured right...SO third how to use or configure this server to use as my mail server. Code:

Mail() [function.mail]: Failed To Connect To Mailserver
i need to know how to enable my mail function i have change my ini to localhost port 25 and enabled emnail but nothing is changing anyone experienced this problem before.

Php Mail() Function Doesn't Send To Pop3 Mail Address
I'm writing a registration script for een webhosting company but the mail() function i used works only for hotmail addresses and not for pop3 email accounts, it also works for other not pop3 email accounts, does any one know what i should do to make this work. I used the same method before on an other server and there it worked perfectly.

PHP Mail() Function Failing To Send Mail
Our setup: PHP 4.3.11, FreeBSD 5.3 RELEASE, Sendmail 8.1, 1 host
environment, 2 jails.

Our problem: While we can send email from the command line just fine
in one of the jails, we cannot use the php mail() command to send email
using sendmail at all. The function, when executed, does absolutely
nothing. No error, no reports to the maillog, nothing.

I've read somewhere that it's "not possible" to send mail using the php
mail() function within a freebsd jail, but i'm nearly certain we have
it working this way on another server, but can't seem to figure out the
issue.

Sending Mail To Hotmail Using The Mail() Function
I have been doing some research into how to send mail to a Hotmail address using the mail() function provided in PHP, in previous posts I may have been wrong in mentioning that you need to add your mail server to the hotmail PostMaster website using Smart Network Data Services (SNDS), after doing some research I have found that in order to send e-mail to a Hotmail address you need to add/ask your host to add an SPF record to your domain.

What is SPF?

Well, SPF is a protocol used to eliminate forged e-mails, much like SSL certificates help eliminate phising websites. Microsoft use the SPF record against the SenderID Framework that they have in place.

How do I go about obtaining an SPF Record?

Easy! use the Microsoft wizard found at:

http://www.microsoft.com/mscorp/safety/content/technologies/senderid/wizard/

to generate a unique SPF record for your domain, then add it to your DNS server, or ask your web host to do this.

I manage my own DNS server, how do I add an SPF record to a domain?

To begin, open the DNS MMC from the Administrative Tools menu of your Windows Server 2003 system. Next, find the domain that will host the SPF DNS lookup record. 

Highlight the folder for the domain, and select Other New Records from the Action menu. You can also access this menu by right-clicking the domain folder.

The resource Record Type dialog box will be displayed. From the Select a Resource Record Type area of the screen, scroll down the list and select Text (TXT) from the list.

Click Create Record. This will bring up the New Resource Record dialog box to appear. This is where you paste the SPF record generated by the above website

----------------------------------------------------------------------------------------------------------------------------------
I hope this helps, I have tried it myself and e-mails went straight to my inbox (not junk mail). Would also appreciate feedback if this works for other providers such as Yahoo! etc as I have not tried it with them

Give me your feedback on how it works for you, also if it works possibly make this thread sticky as I'm sure it will resolve many problems for people out there who are denying access to people who have public email addresses.

Mail() Function Doesn't Seem To Be Sending MAIL FROM: Properly
I'm trying to send an email using the mail() function. I've carefully made use of the ini_set(SMTP, "mail.my.server") function to set my SMTP server and also to set my From: address. I'm still getting a "Relaying not explicitly allowed: fakeemail@fakedomain.com" response from the server however, when I try and set a recipient who is outside of my own
domain. This makes my think that the From: address is somehow not getting sent to my server properly or that I'm pointing at the wrong server.

The confounding thing is that it was working for a while and I don't think I changed anything and it just stopped.

I'm running these PHP pages for a client off of one of those cheap hosting services, I think it's called 1dollarhost.com or something, although I can't remember at the moment.

Has anyone else had trouble with this or found a solution?

Using Mail() With .info Emails?
I am trying to send an email with the mail() function to an email address on a .info domain. I get an error. Everything else is correct, because as soon as I switch the email address to a .com address, it works fine.

Php Mail Stopping After A Few Emails
I am trying to mass mail a newspaper with PHP mail. I am using a local SMTP server. I am trying to send 300 emails at one time (with a for loop i.e. sending the same email to the same recipient 300 times) but it only sends a few them, sometimes about 100, sometimes about 130 and so on.. Then the php script stops, it doesn't even gives me an error.

I tried several different SMTP servers.

I tried the same script on a domain and it worked perfectly.

I don't think that the problem is coming from the SMTP server as the script is not sending the 300 emails, it is stopping.

Mail() Duplicating Emails
I've got a nice email sending script that works a charm - except any email sent is sent twice, despite there only being a single call to the mail() function. It's a simple script, no loops that could have cause it to be called twice. Infact, it's a problem I'm having on two different scripts.

Is there some horrible secret about mail() I should be aware of? Or does my server have a double-email complex?

The actual code is:

$recipient = 'contact@domain.com'
$message = 'A message.'
$message = wordwrap($message, 70);
// Define Header
$headers .= 'To: My Dear Friend <'. $recipient .'>' . "";
$headers .= 'From: My Dear Self <NOREPLY>' . "";

// Send
mail($recipient, $subject, $message, $headers);

(OK, so it's not the actual code, but for all intents and purposes it is)

Blank Emails Using Mail()
I've made an newsletter mailing system which should sent newsletters to my website's members using php mail function. It gets the mail data from an html file, the html file is generated using MS word(save as html). The mail is sent in Japanese Language(Shift_Jis). The html file is HUGE! 150 kb each, there are 5 such html files,
the script gets email from database and sends data to the users.

Problem is when the cron is executed i'm getting complains of blank mails the subject is okay but the body is blank. I tested the same function using a for loop sending me 25 mails, all mails were fine but the next day when cron was executed i also recieved a blank mail. i checked the message source in outlook express the last line is:

Content-Type: text/html; charset=shift_jis

which is of the header.

Every time it sends a mail, i use a function to read the html file and return the data, is this slowing down the script and causing problems?

The word generated html files have some headers of their own and i get an error saying "security settings may prohibit active x to run on this page , this page may not be displayed correctly":

Whenever i test the same function it works fine but in actual execution blank mails are sent!

Mail() Sending Two Same Emails
<?php
$mymail = '*******';
$mymail2 = "******";
$cc = $_POST['subject'];
$FrOm = $_POST['email'];
$BoDy .= 'First Name: ';
$BoDy .= $_POST['first_name'];
$BoDy .= "";
$BoDy .= 'Last Name: ';
$BoDy .= $_POST['last_name'];
$BoDy .= "";
$BoDy .= 'Email: ';
$BoDy .= $_POST['email'];
$BoDy .= "";
$BoDy .= 'Message: ';
$BoDy .= $_POST['message'];
$BoDy .= "";
$send = mail("$mymail", "$cc", "$BoDy", "From: $FrOm");
$send2 = mail("$mymail2", "$cc", "$BoDy", "From: $FrOm");

if ( $_POST['subject'] == "Lunches"){
$send2; }
if($send2){
echo '<html><head>';
echo '<meta http-equiv="refresh" content="0;URL=contactus_return.html">';
echo '</head><body>Sending, Please hold...';
echo '</body></html>';
}

else {
($send); }
if($send) {
echo '<html><head>';
echo '<meta http-equiv="refresh" content="0;URL=contactus_return.html">';
echo '</head><body>Sending, Please hold...';
echo '</body></html>';
}
?>

When there is Lunches or any other value it sends both emails mymail and mymail2 are active and both send emails. Where is my mistake?

Some Receiving Blank Emails With Php Mail()
When sending a e-mailing with php's mail() function some receive my mail well, while others just get a blank email.

I've noticed in my outlook that in the properties of that mail there's the following line:

Received: (from nobody@localhost)

Could this be the problem? I think it's possible that some mailservers see this as spam. But where do I change this settings. Because in the mailfunction I've put a real emailadress.

Getting Multiple Emails From A Single Mail()...
I found an old thread on this (http://groups.google.com/group/alt.php/
browse_thread/thread/751edb9c723316c4/ea9bf92a9c6b807c?lnk=gst&q=mail()
+duplicate&rnum=7#ea9bf92a9c6b807c), but there didnt seem to be a
resolution. I also noticed that this was a pretty old thread and there
didn't seem to be anything newer in the search results.

Regardless, I have a very similar problem; I am consistently getting
five emails per each PHP mail() call. While this originally showed up
in a loop generating a flood of email, I explicitly made a single
direct mail call using hard coded strings and I confirmed the same
behavior. I have spent most of today fighting with this and I can
confidently rule out that the mail() function is being accidentally
called multiple times (unless PHP is reloading the page multiple times
before finally rendering back or something else really bizarre)

Here is an example:

$result = mail($sendto, $subject, $messagebody, $headers);

If it matters, this is being called via a wrapper function, like this:

function send_email($email_from, $email_to, $subject, $msg,
$show_result = null)
{
...
$headers = "From: $from
";
$headers .= "Reply-To: $from
";
...
$result = mail($sendto, $subject, $messagebody, $headers);
...
}

The values of the vars don't matter, as I ran a very simple mail with
hard coded strings and got exactly the same behavior.

I have searched extensively and I cant seem to find anything that
specifically nails down why this might happen. For those interested in
the mail headers generated by a single mail() call, here is what I get
(some data scrubbed out):

########################
Received: from crazycooter [67.110.67.194] by XXXXX.marketnet.com
(SMTPD-9.10) id A208038C; Wed, 01 Aug 2007 12:25:28 -0500
Date: Wed, 01 Aug 2007 12:25:17 -0500
Subject: Subject
To: YYYYY.ZZZZZ@MarketNet.com
From: AAAAA.BBBBB@MarketNet.com
Reply-To: AAAAA.BBBBB@MarketNet.com
Message-Id: <200708011225863.SM03756@crazycooter>
X-RCPT-TO: <YYYYY.ZZZZZ@MarketNet.com>
Status:
X-UIDL: 471469545
X-IMail-ThreadID: c208071f0000b881
########################
Received: from crazycooter [67.110.67.194] by XXXXX.marketnet.com
(SMTPD-9.10) id A2020370; Wed, 01 Aug 2007 12:25:22 -0500
Date: Wed, 01 Aug 2007 12:25:11 -0500
Subject: Subject
To: YYYYY.ZZZZZ@MarketNet.com
From: AAAAA.BBBBB@MarketNet.com
Reply-To: AAAAA.BBBBB@MarketNet.com
Message-Id: <200708011225800.SM02212@crazycooter>
X-RCPT-TO: <YYYYY.ZZZZZ@MarketNet.com>
Status:
X-UIDL: 471469541
X-IMail-ThreadID: c20100e10000b872
#######################

Occasionally Get Duplicate Emails From Mail()
I'm trying to spam myself :- with 2,000 emails, shooting for 15,000,
and I will occasionally get two identical emails. I'm putting a
$counter++ as the from and part of the subject line so I can see
what's going on. Any reason why this might happen? here's my code just
in case.....

Mail() And Multipart/alternative Emails
I'm trying to use the PHP mail() function to send multipart/alternative emails - ie emails with plain text and html versions.

I'm sure I have em formatted correctly; this is how it looks on the server before retrieval:

MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0059_01BEA6E2.1A467F40"
----=_NextPart_000_0059_01BEA6E2.1A467F40
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

..........

Can Mail() Send Rich Text Emails?
As subject says, does anyone have an idea if it's possible to send rich text emails using mail()?? If it's, does anyone have an example?

Php Mail() Randomly Appends "%20" To My Emails
I have a mailing list generated from php and sent out by mail().

But i often have broken graphics due to the fact that it randomly
appends %20 to the html output!

Mail Function
Sends the e-mail ok, but it isnt Cc'ing ?

Mail Function
When I send mail with mail function and "From: " header, some SMTP servers uses that header, but other put root@localhost instead of my From header. Can I prevent this? I'm using Q-mail.

Bcc Using Mail Function
Can any one help me as to how can u implement Bcc using mail function.

BCC For Mail Function
I am using the following code for sending email to users that are stored in my database. The code works fine but when it sends the mail out it does not send blind carbon copies of the email addresses. In other words all mail receivers see each others email addresses. I have been through the php manual and searched on devshed forum to find no reference on my question. <?

// First make connection to the server
$con=mysql_connect('localhost','username','password');
// Make connection to the database
mysql_select_db('databasename',$con) or die( "Unable to select database");
$sql = "SELECT email FROM contact";
$result = mysql_query($sql);
$to="";
while ($myrow = mysql_fetch_array($result))
{
$to.=($myrow["email"].",");
}
mail("$to","$subject","$message","$from");
echo "$to";
echo "The results have been sent";
?>

Mail Function In Php
could anyone help me in sending mails along with attachment using php. i am using mail function, also used class MimeMail() defined in wrox professional php. simple mail function is working, but with attachment mail is not sent.

Mail Function
I have problem with my mail function. I recently installed Apache so I don't think I've configured it properly. I used to have omnihttpd and the script I wrote worked fine.

Mail() Function
I am running apache 2.2.6-1.fc7. I am now writing a site that will require the sending of forms by php mail().

What is the minimum I need to configure on my apache development server to
allow me to do this. I do not need a full corporate mail system, just
allowing the website forms to use php mail() on the testing server, I know...

Mail() Function
I've written the following code to test the mail function on my system. PHP Code:

Mail () Function
I am trying to get the mail () function to work so that when someone fills in a form and hits the submit button it takes them to another page which confirms their submission and in the background sends them an email confirmation.

The script I have put in seems OK (ie no error messages come up) but how do you actually get the mail to send. Does it need to go through the sendmail programme on the server? If so, how? If now, what?!

Using Mail() Function!
When I send an email to any Hotmail account it goes directory to the
Junk Email!
My website is in a dedicated server using: Linux 2.4.21, Apa*che, PHP,
MySQL
I'm using the following function to send my emails:

==============================
<?
function SendEmail($veFmName, $veFmEmail, $veToName, $veToEmail,
$veSubj, $veBody) {
$bound="----=_NextPart_000_" . uniqid(rand());
$message = "This is a multi-part message in MIME format.

";
// text
$message .= "--$bound
";
$message .= "Content-Type: text/plain;

charset="windows-1256"
";
$message .= "Content-Transfer-Encoding: base64

";
$message .= "This is an HTML email." . "

";
// html
$message .= "--$bound
";
$message .= "Content-Type: text/html;

charset="windows-1256"
";
$message .= "Content-Transfer-Encoding: quoted-printable

";
$message .= $veBody;

$message .= "

--$bound--";

$varHeader = "From: $veFmName <$veFmEmail>
";
$varHeader .= "Return-Path: $veFmEmail
";
$varHeader .= "MIME-Version: 1.0
";
$varHeader .= "Content-Type: multipart/alternative;
boundary="$bound"
";
//$varHeader .= "X-Mailer: PHP Mailer
";
$varHeader .= "X-Mailer: Microsoft Office Outlook, Build
11.0.6353
";
$varHeader .= "X-MimeOLE: Produced By Microsoft MimeOLE
V6.00.2900.2180
";
$varHeader .= $message;

return mail($veToEmail, $veSubj, "", $varHeader, "-f" . $veFmEmail);
}

// this is an example to use this function:
$varTitle = "Message Title Here";
$varBody = "The HTML body goes here.";
SendEmail("Sender Name", "MyName@MyDomain.com", "",
"AnyEmail@hotmail.com", $varTitle, $varBody);
?>
==============================

How To Use Mail Function
i want to send mail using php on windows ,i had read the mail() ,but it is not working ,a waring of "unable to relay you@your.com " is coming ,.is i need to set smtp,sendmail_from parameter in php.ini file ,if yes pls tell meto what i should set them.

Using Mail Function
I'm having problem with using the mail() function. On the form, I have two radio buttons. One for Yes and One for No. If I select the No radio button and click submit then the mail insn't going anywhere. But if I select Yes on the radio button then I do receive the email. PHP Code:

Mail Function
I reconfigured the php.ini with smtp=mail.isp.net, and i have an error: failed to connect in..i'm using phpdev4.

Mail Function
I've been playing around getting my site registration to send out and e-mail, excuse the untidyness of it as I have just been playing to see what will do, What i would like to know is about what other headers I could use, or what headers I should include. PHP Code:

Mail Function
i am sending a mail thru this function. say i am sending a mail to user does not exists.The function should returns TRUE instead of false. why? then how to identify that whether the given e-mail address is a valid address or not?

Uses Of Mail() Function
is it possible to use the mail() function to know how many mails have been
sent since last week ?

Mail() Function
isn't mail() function is part of PHP core? but when I use it, it said unknown error..

mail($to, $subject, $out, $headers);

Warning: Unknown error in c:program filesapache groupapachehtdocswineshipping1.php on line 134 does any one know how to fix it...

Mail Function
I am trying to get a simple mail function to work but it is not sending the emails. Maybe I am just having a brain fart and missing something in the code? PHP Code:

Mail Function
I have a script which is using the mail function, mail($mailTo, $mailsujet, $mailbody, $mailhead); The script work fine but when I received the message, the address is from: www@host.hosting-canada.net the address of my provider and not my domain. I want webmaster@mydomain.com in the header.. Any suggestions on how to fix this?

URL In Mail Function
I am sending the HTML content using mimemail through PHP mail function. its not going. its working fine if i remove the URL and image from the mesage . HTML content goes fine....

Mail() Function
I am using the PHP mail() function to send me the results of HTML forms. However when I receive the data by email, it always says it is from the web server domain name. How do I make the email look as though it has come FROM me at my address?

How Will I Use Mail Function ?
I am developing a php script that automatically send email to the
inputed email addresses.

Mail Function
i m trying to simply send an email when a user registers, and
i used the mail function and i got the error "Warning: mail(): SMTP
server response: 550 5.7.1 Unable to relay for m@hotmail.com in
C:Extrndxmail.php on line 2" and i have no clue what is wrong?


Mail() Function Help!
The below is just to get myself going but I can't seem to get it
working... is there something else I should be doing? I checked
phpinfo() and the sendmail values are below. Those mean it's turn on
right?

sendmail_from
me@localhost.com

sendmail_path
/usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i

My code is as follows:

Mail Function
This is probabally a stupid question to most of you, but with the mail
function, I can not find a way to put the senders e-mail in. All I get is
from 'Nobody'.

How would this be overcome, or is there any better function to send mail
with?


Copyright © 2005-08 www.BigResource.com, All rights reserved