Exim / Php Mail Function / Bulk Mailing
I've learned that my new dedicated server comes with exim installed. From what I understand, you can use php's mail() with exim, but you can't modify the 'From' header. I need to do that so I've scurried in search of an alternative to the mail function. I found the function below ( from http://www.php.net/manual/en/ref.mail.php#41340 ) works well, but, not being at all familiar with exim, I have a few questions about it.
Is it feasible to be used in a bulk email script (1 call per email)? I'm a little concerned about the sleep function. Obviously that's going to slow down an already somewhat resource intensive bulk email script. So what is it actually there for and is it really even needed? If this isn't a doable solution, is there something else you could suggest?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Bulk E-mailing
I have read a number of the threads on bulk and mass emailing using PHP with a MySql databse. Interesting and informative. But would someone be kind enough to share their complete sucessful code that starts at step one.
Mail() And Exim
I am looking for some advise here... I am running php on RH9 Using Exim as a MTA which is used as my test enviroment. Problem is that when I send mail through php it is sent from nobody@mydomain.com and the email is converted to plain text which displays all the html.. Is there a configuration setting in my php.ini that must be set... When I upload the scripts it works fine on the service providers side, but I need to get my setup working properly... Sample mail code.. $info = nl2br($_POST['info']); $emailadd = $_POST['email']; $to = "webmaster@domain.net"; $subject = "Information Request from Website"; $from = $_POST['name']."<".$_POST['email'].">"; $headers = " MIME-Version: 1.0 From: $from Bcc: ray@domain.co.za Reply-To: $emailadd Return-path: $emailadd Content-Type: text/html; charset=iso-8859-1 X-Priority: 1 X-MSMail-Priority: High X-Mailer: php "; $message = " <html> <head></head> <body> <font size="2" face="Arial"> <b>Name and Surname : </b>".$_POST['name']."<br> <b>Office Phone : </b>".$_POST['officenum']."<br> <b>Home Phone : </b>".$_POST['homenum']."<br> <b>Cell : </b>".$_POST['cellnum']."<br> <b>Email : </b>".$emailadd."<br> <b>Info Requested :</b><br> $info </font> </body> </html> "; <? if(mail($to, $subject, $message, $headers)){ ?> <br>
Bulk E-Mail Thru PHP
My client has a website that offers a newsletter to readers. They signup for the newsletter and I store their e-mail into a SQL database. I want to enable my client to use the data in that database to send an e-mail to these ppl through a page on their site. ... I guess the real question is, would it be ok to do something like, FOR each EMAIL in DATABASE mail($to,$subject,$body,$headers); Or is that too intensive on the server?...I don't expect more than a thousand people to ever sign up for this thing.
Bulk Mail With PHPMailer?
Is it safe to use PHPMailer to send bulk mail? If so, how do i know it will not time out? Should i be using the phpMassMailer class? How do i know that that one will not time out? I am using my localhost godaddy dedicated SMTP server to send out mail, and only a couple will go through at a time. I have to wait about an hour for the rest to send. Is there another SMTP server i should be using?
Bulk Mail() + Attachment In A Loop
I have the idea that sending bulk mail in batches is the thing to do. Script timing out [max_input_time ?], spam, and such. About 500 on the mail list. I send in lots of 100. Are batches a good idea? Not necessary? Other thoughts? Attachments: I have got the script sending an attachment - in a single batch loop. But, from the PHP manual >> file will be deleted from the temporary directory at the end of the request... I presume this means the end of the first batch. So, I hesitate to charge off exploring alternatives without your guidance. My script hand is slow and debugging can be tediously slow - especially with mail script as it can only be done on-line and I am on 36k dial-up at the moment. My first thought is to literally upload the file to my server and unlink on completion of the last batch.
Duplicate Mail When I Send A Mailing-list
I use mysql and the function mall to send a mailing-list. When I execute my script, certain person receives two or more identical messages. I think that the problem is in the server smtp which does not manage to send all the messages at the same time.
Hotmail, Php4, Exim, Multipart Emails
I have an email script which sends multipart messages (text or html) which works just fine. Our main servers run php4 and one of the local dev machines php3. For most of what we do this sint something that would cause any issue. However when a user sends an email from the main server to a hotmail account, the mail is sent with no errors from the server, is accepted by hotmails servers and *apparently* delivered. Theres no bounce or rejection occurring. But the mail doesnt get delivered. If I remove Code: " and <img src=> and hrefs from the html and Code: http:// 's from the text version it will send. However if I send the html version with no img references but with a URL just written (no href) then it does send. This mail works fine from the local dev machine(php3) and delivers to hotmail. From the main server(php4) it sends the mail to every other account (yahoo, my work addy etc etc) without problem always delivering the correct version etc. Has anyone got any thoughts about this, seen anything, I'd be interested as it doesnt really fit into any sort of obvious pattern to find a solution to.
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:
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.
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?
'bulk' Proccessing
I have a program to add 'stamps' to sets of stamps. First you enter the number of stamps in the set(addStamp.php). Then it displays that many sets of forms (addStamp.php?do=input). Finally these are all inputted to a database (addStamp.php?do=database). The problem is processing the multiple sets of data. I've tried something (see the $tn 's in the code) but can't get it to work. Can anyone help me out? Code:
Bulk Insert
I have this form that reads some info in a database that is available for inserting into another table. on each row I have a checkbox. I'd like to take the info out where there is a checkbox marked and insert into my table. Make sense? Any idea how to do this. Code:
Bulk Email Tool
I'm trying to write a bulk email tool. I ran a test on my server to see how robust the mail() function would be when under load. I wrote a simple script that just incremented the alias part of the email address and then sent it. I set it in a loop to send 1000 emails, but just over 27% of them failed. My automated email tool will need to send out a newsletter to about 17,000 people. How should I go about it? The test I ran leads me to believe that simply looping through the email addresses of all site members would not be reliable. What would be best?use usleep() to have a very small pause after each email is sent?only send 200 at a time?
Bulk Emailing With SMTP
I'm researching ways of using PHP/mySQL to send a single HTML formatted email message with attachments to many, perhaps 1000 recipients. From what I've read in this forum it seems a good idea to bulk mail by sending the mail message and recipient list to a SMTP server rather than repeatedly calling the mail() function. This avoids the situation where the server stops a php script from executing due to time out. What does SMTP support that makes it more effective for this sort of thing? also is the phpmailer class from Source Forge an effective php script for bulk mailing HTML formatted email to many users?
Bulk Submission To Whois
I have a script (php) which allows me to query a whois server and return specific fields. My question is, how would I submit more than one domain name at a time to my script so that each returned field is then stored into a database file associated with the domain that is queried? There is approx. 8000 domain names registered thru our registry and we need to update the admin contact emails. The domains are currently stored in a MySql db which can be easily converted to a text file.
Bulk Email Server
I am using php mailer and the host I am on has a limit on the amount of emails you can send every hour. What would be the best place to host this type of thing so its fast and it works I only have about 1000 addresses
Bulk Insert => MYSQL
How do I instert multiple rows of SQL into a database from a php file? Is there a way to have a PHP file read a MYSQL DUMP (.sql) file and run it?
Send E-mails To Bulk Contacts !
I want to know what the best way to send one e-mail to a lot of contacts ( my members here in my situation ).. as the newsletters for example.. using php code for sure note : if this would make a diiference then : the e-mails address are stored in mySQL table.
How To Send Email In Inbox Not In Bulk
<?php $to="myemail@yahoo.com"; $subject="Testing Purposes"; $message="This is my message"; $headers="From: samle@yahoo.com"; mail($to,$subject,$message,$headers); ?> this one goes to the bulk!!! what i want i to send i to inbox.
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 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?
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?
|