I am currently using PHP mailer. I would like to create a mailer script where I can add an arbitrary (anywhere from 10-1000) number of fixed e-mails and type in a message in a textarea and the mailer will mail each person the e-mail individually rather than all at once. I would like to avoid users opening an e-mail that appears to be sent to 1000 other e-mail addresses and make it more personal (i.e. sent from e-mail address x to y, as opposed to, sent from e-mail address x to a,b,c,...) This will simply be an administrative extension for admins to easily mail out newletters to all subscribers.
I was wondering what would be the easiest way to implement this? I would rather stay away from cron jobs, if it is possible to implement this without it.
I appreciate any advice.
Many thanks in advance!
Related
I'm in need of setting up an auto-response from an email account that I control, based on trigger words within the body of the email. But also, it needs to add/delete rows from a database table based on trigger words sent to this email account (that belongs to my site) and it needs to create a topic, in some cases, within a forum, if sent to a different email address (but on the same server). I know PHP to be able to do this, but not really sure how to trigger a PHP script to be executed when an email gets sent to a specific email address account that I control. Or if there is another solution to accomplish this, please let me know.
This is basically an inquiry on how to accomplish something like this, based on an email sent to a specific email address on my server with words like: "Join", "Leave", "Set Mail", "Set Digest", etc. etc.
There will be another email address account set aside that will need to send those subscribers in the database, the same exact email (Mass Send). This is for a CDB-L ListServ. Kind of old school I suppose, but we want to transfer this ability to our server, since these old school methods still work today and is very much active.
Curious on security issues, what type of server software I'll need and just a basic approach on how to set something like this up.
You can alias your email address directly to a php script if you run your own mail server (on linux this would just be in the /etc/alias file or equivalent where the target was your php script instead of an email address) eg http://www.topwebhosts.org/bbs/board.php?bo_table=server_mgmt&wr_id=73
If not, then your only real choice is to set up a php process that checks an email address for mail every x minutes.
I have used both these methods over the years to great success
You can walk through emails with PHP's IMAP functions and undertake action (based on conditions/content). More info.
I looking into building a system that can read and send mails all by itself.
The mailserver already exists. All I want to do is fetch the e mail data with a php script running locally on the mailserver, store some of the data in an external database.
Then when an "event" is raised, I want to run a php script that get's some data out of the database, create a mail , and send it through the mail server.
I'm fairly new to this, so I hope the things I say make sense.
Here's my question: Is it secure enough to work this way?
Am I doing anything against "the rules" ?
Thanks
There is nothing wrong in doing the things this way. Its not against the rule. But Email Deliverability is not guaranteed because:
There is no guarantee that the email you send will pass the spam filters of email providers.
Number of emails you send to 1 user in a day, Any spam keyword in the mail content, user marking your email as spam etc.
Basically, there are n number of reasons why your mail server might get blacklisted by email providers.
To ensure Email Deliverability, you need to get your mail server IP whitelisted with all the email providers. (which is not easy)
I would suggest you to use bulk email sending third party solutions like Sendgrid, Madmimi, etc.
Refer: Discussion on choosing email sending service
Also, these services also gives statistics like open tracking, click tracking etc...
We are developing a email web site.but we are facing problem in receiving and validating the mail.i have the following doubts.can you please help me in clarifying these???
one more important thing is we are not using squrrelmail, qmail etc.
how do we receive emails for users in email web site?
do we save all the received emails in admin's mail box or in database as per the username
(my idea on email web site is,all the incoming mail are stored in admin's mail box and after the email mail is stored in database,and then the mail deleted in admin's mail box.Is it correct.if not how to store the emails in database directly in web site)
what is the technique behind the receiving mail???i think there are various techniques like email piping etc.
is there any special process of creating users for email web site,i mean do we need to create mailbox(i think mail account) for each user at the time of registration.if we need to create mail box for user,can we create it with imap_createmailbox() function.
are the users gmail,yahoomail etc are accessig database or their mail accounts at the time their login??
can we do all these things with imap functions in php??
There are many different solutions to this problem, polling existing servers, adding scripts to run when a message is received or using a gateway like CloudMailin. I wrote a blog post relating to this (it's for rails but almost all applies to php too).
The other problems almost all span from how you setup the first thing. In many cases you could just log the emails directly to your database and retrive them based on the recipient address. I think you need to explain exactly what you want to do with the email? Are you just providing email hosting for your users or are you providing an additional service? If you're just providing hosting then there are simpler approaches available.
I have written a script for my clients to generate a newsletter form, embed it on their website, collect email addresses and then email them using a php while and PHPMailer.
Currently, the script uses a "double opt in" which sends an email from "myclient#myclientsemail.com" to the subscriber to click on a confirm link that then goes to "http://myserver.com" to complete the confirmation process.
My question is,
the mail address they are receiving the confirm script from and the address they are confirming their email address with is different, will this be a problem?
In other words, does the spam filter add the confirm email "from address" to the friends list or the address of the link in the email?
The desired end result obviously being the "from address" (my clients address) being the one that will not be junked in future.
Thanks,
Anthony
My company does something similar. The double opt-in is something that you're doing on your end to ensure that you have valid results, not an email sent in by the user's enemy wanted to load up their account with spam. The theory goes that if someone is going to be malicious like that, they wouldn't have actual read access and time/means to respond to the second opt-in, making it about as fail proof as possible.
The spam filters don't know if you did an opt in at all, they just know what they see and who's doing the sending. So as long as you're sure the user you're getting approval from is the same one, you should be good to go. If you've properly configured headers, ensured list accuracy, aren't mail bombing (i.e. loading a host with thousands of messages in a short amount of time) and include content that's not "spammy" you'll be fine. Just remember, there's virtually no way to 100% guarantee delivery of an email thanks to overzealous IT guys and spam filters and the distributed nature of the web.
Note that being a new system, your host is not yet "trusted" so you'll have higher than average bounce stats likely. I'd recommend doing a "break" script when you send to ensure that emails are "trickling" out at first while you gain hosts trust. Even with well-established servers, my company's policy is no consecutive emails to a host will be delivered with less than 50 ms break in between, and it's worked well for us (we deliver 100k+ per day) And no matter what, include CAN-Spam items such as opt-out, physical address, and proper subject line...no exceptions.
I have a web page that generates several email addresses. I need to be able to click on a link, which will open an email client such as outlook and populate the bcc field with those email addresses. In the past, we have used html's mailto, which achieves this goal perfectly.
My problem now is that I need to send emails to over 200 people, and mailto cannot handle that much information. Since the page also uses PHP, I have considered PHP's mail() and phpmailer(), but since both require that the entire email be generated on the page and the email client is never opened, they will not work.
Does anybody know of an alternative method I can implement to achieve this functionality?
Create a mailing list, add those e-mails to the mailing-list and send mail there instead.
As a bonus, you can use VERP to prune invalid addresses.
I don't think there is a convenient alternative method.
You could offer a textarea field containing all the addresses in a comma-separated list. That list could be easily copy+pasted into the client's E-Mail program.
If the client's E-Mail is on the same domain as the web site, and you have full control over your server, you could randomly generate E-Mail addresses on your server using PHP:
1293820239453202349#example.com
that E-Mail address would be configured to forward incoming mail (that your user with the mail client writes and sends to that one random address) to the big list of recipients. This is a very advanced method but hard to implement.
Maybe you can make an email group, depending on your mail system, such that when you send a mail to the address of the group, it will distribute to all members?
On our company, we have several groups. all#company.com, sales#company.com, developers#company.com etc. Sending one e-mail to such an address will make all members of the respective group receiving it.
MailTo with a Copy
<a href="mailto:astark1#unl.edu?cc=ASTARK1#UNL.EDU">
MailTo with a Blind Copy
<a href="mailto:astark1#unl.edu?bcc=ASTARK1#UNL.EDU">