i m working on job portal, for job alert i am sending mail for each user as per his/her subscription using cron job of php script. i have more than 10000 users(jobseekers) in portal. does php native function mail() can send more than 10000 mail without using smtp or other mail server?
and sorry for bad English.
can send more than 10000 mail without using smtp or other mail server?
No it cannot send even 1 email if you don't provide it either of them. If you don't provide an external smtp then you have to have a mail server installed on the machine itself. Once that is done, 10k mails are not a problem.
Note:
It is worth noting that the mail() function is not suitable for larger
volumes of email in a loop. This function opens and closes an SMTP
socket for each email, which is not very efficient.
For the sending of large amounts of email, see the » PEAR::Mail, and »
PEAR::Mail_Queue packages.
Reference:
Related
Should there be a record of all php sent mail (via our hosts mail() function) anywhere?
Our web developer made an oversight and all enquiries sent via the our host's (godaddy.com) mailer relay for the last 2 months were rejected by our local mail server. Naturally, our server doesn't keep any rejected emails.
I have spoken to godaddy.com and they claim there is no record, however I'm not particularly confident with the answer.
Is there anything I can do? The enquiry form is now fixed (used Mandrill), so that's not an issue.
No, the mails are gone now.
Rejected mails that a mail server tried to send usually go to the mail admin account of the sending server as a bounce - however, even that account might not be set up or failing or rejecting mail, so the mail server will get rid of these undeliverable mails that double-bounced by deleting them from the queue.
You might get an idea of what was tried to mail if you are able to get your hand onto a mail server logfile, but assuming this is in the hands of your hosting provider, your chances are low: 1. these logs would only give you an idea of which mail addresses were involved, but no content. 2. the log files usually get deleted quickly because they'd serve no regular purpose.
i am doing one project. In that project i want to send mail to my customers in php.
presently i am using the sendmailer.php package to sent mail.
Using this package i am sending the mail through my gmail account(i.e, SMTP Protocol).it takes 20 sec-1 min.
here my doubt is...
is it possible to send mails to customers with out using smtp protocol..
i know there is a function called mail()..
but my doubt is..!! is it send my mail to customers..?
please clarify my doubt..
i am stuck here..!!
No, It's not possible without a SMTP.
You have to define your own SMTP server settings that normally your host provides, in the PHP ini file for example, when you use the normal mail() function.
You can change the settings like this:
ini_set("SMTP","smtp.example.com" );
ini_set('sendmail_from', 'user#example.com');
I have an application to notify "friends" if there is an activity on their associates' pages.
This works but after series of tests seems it sends to the first few people and not to the rest.
No errors as the script redirects to mail sent page.
Now my host provider has a limit of 500 mails per hour for an account on their platform and the email list is over 3000.
Could this be the problem? What better options do I have?
Thank you.
Currently using PHP Mail Function
It is worth noting that the mail() function is not suitable for larger volumes of email in a loop. This function opens and closes an SMTP socket for each email, which is not very efficient.
For the sending of large amounts of email, see the » PEAR::Mail, and » PEAR::Mail_Queue packages.
500 mails per hour should be the problem if your app takes that much volume. For a php server with usual configuration, mail() sends mails to local sendmail, then to local SMTP server where the host provider limits the rate. When the limit is reached, no one is on php's side to receive the error return mail.
I don't think it's hard to estimate the volume of your app. If you do need to send that many mails, consider rewrite your php function to use other SMTP server, e.g. Google Apps. Of course they come with their own limits however.
I am using php mail() function to send a newsletter (this function works well for me because right now I only send a few k emails a week), I am currently looping mail() function foreach email i need to send, but I was thinking about using BCCs to send more emails on each loop so it will take less time to process, whats the recommended amount of emails I should use for BCCs in php's mail() function?
Note: I am working on a implementation of phpmailer class but that will be for next months because I want to do a good script with that, right now mail() function is enough for me.
You should know that you'll never have as good deliverability from your own server compared to using an email marketing service. Even if you were to become a domain expert in e-mail systems and configured your servers identically to theirs, they'd still deliver mail where yours end up in junk folders or rejected.
Check out
http://sendgrid.com/
http://postmarkapp.com/
As per RageZ's comment, the limit is imposed by the SMTP relay or local spool. For Postfix this is default set to 50 recipients per message, Sendmail & Exim are unlimited, Microsoft Exchange 2003 defaults to 5000.
Postfix:
http://www.postfix.org/postconf.5.html#default_destination_recipient_limit
Sendmail:
http://www.sendmail.org/m4/tweaking_config.html#confMAX_RCPTS_PER_MESSAGE
Exim:
http://www.exim.org/exim-html-4.30/doc/html/spec_14.html#IX1267
For comparison purposes, Microsoft Exchange:
http://technet.microsoft.com/en-us/library/aa995735(EXCHG.65).aspx
http://technet.microsoft.com/en-us/library/bb676532.aspx
what is the main Logics between php mail(), sendmail(), using SMTP in php
why we are creating noreply1#domain.com, noreply2#domain.com,... and so on. Is there any problem in this?
WE are building Newsletter management which we try to sent minimum 6000 mails per day. Our domain is in dedicated sever.
We are trying to sent 10,000 mails per day.
Which is the best solution.
I tried out swiftmailer it sent 4 mails and stoped with error message
"Unable to send message due to connection error"
some time it sent 100 and stopped.
What may be the problem is? Is it a coding problem or server problem
I think your first action should be to check the SMTP server you're using (I assume you are using SMTP) whether it has any sending limits imposed. Then, speak to your ISP / provider whether they have any kind of spam detection in place that could prevent the sending of mass E-Mail.
If you are not using SMTP, but mail(), switch to SMTP. Mail() opens a new connection for every outgoing mail and is not recommended for sending larger quantities.
If nothing else helps, split the E-Mails into smaller jobs, making them easier for the server to digest, and/or add a few hundred milliseconds' pause in between sending of each mail.
mail() does not use SMTP; it delegates the actual sending of mail to the sendmail binary, so you have to configure the MTA on your system properly in order for it to work.
There is no sendmail() function in PHP.
I tried out swiftmailer it sent 4 mails and stoped with error message
"Unable to send message due to connection error"
Probably not a code error. Most likely candidate is that the SMTP server you are using is throttled to prevent use for bulk email sending. Have you asked your server provider / SMTP admin guy?
Solution is to run your SMTP server.
C.