I'm wondering it is possible to send a more than 1000 emails at once in Drupal 7 Drupal_mail function?
Depending from the PHP Server, probably your site will crash. If you are looking for a module which will allow you to do this in the background and much simpler in implementation(without adding hooks) you should give a try to module called Simple Mail
Related
I would like to know if there is a way how I can send e-mails with preferabel php or JS without needing an actual mail server. I am pretty sure it won't work, but have any of you an idea how there could be a way?
You can send mail with a lot of services, I believe they are called 'exchange' mail services. Gmail, outlook (or live, hotmail) are examples of these services. Google is full of examples :-)
I am modifying my website so users will be able to send an email through our webform.
Everything is written in PHP.
I will be using standard mail() function (PHP) and as I understand it will use local smtp server to send an email (this is sendmail, right?).
Should I maybe use SMTP server to send those emails?
I am asking because using standard mail() function it will use local server (Debian Linux 6.0) and I never really used it... I just want to be sure that all of those emails will get throu.
You have to keep some standards for sending emails in mind but then it will work fine:
set a RDNS entry for the IP you are sending the emails from
your email server must be not an open relay
don't send emails to users who didn't opt in to your email list via double opt in proceeder
your server IP need to be nowhere blacklisted
If you are sending a lot of emails (like 5000 emails and more) you should use a special service for that. A shared hosting plan or a VPS won't be a good idea for that amount of emails.
I always use PHP mailer. Its very easy to configure. Refer http://www.inmotionhosting.com/support/email/send-email-from-a-page/using-phpmailer-to-send-mail-through-php
Delivering mail is not an easy subject. If you don't want to dive into it, http://mandrill.com/ is a great solution. They offer a great free plan, and they manage all the deliverability issues for you.
We use Mandrill on all our new projects. We were using SendGrid, which is also good, but is more expensive (and not better).
I have a basic Drupal install and a bunch of users.
How could my Drupal users receive e-mails from the outside world at their address (e.g. user#my-drupal-install.com)?
Thank you!
Drupal is a system for serving web pages, it does not run mail servers. If there is no mail server present on your system, you will need to install one. Once you have a mail server running, you can install a Drupal module such as Webmail Plus to provide a webmail interface for your users.
For the case you describe I think the best way to handle this is to set up a mail server with automatic forwarding, and run a batch process once a day or so that extracts the usernames and their e-mail addresses from your Drupal database's user table. Drupal itself doesn't need to be involved in the actual sending and receiving of e-mail at all.
If you are using the Drupal username as the first part of the e-mail address then your export script could just run a query like
SELECT name, mail
FROM `users`
WHERE 1
as part of a shell script that populates a table of e-mail addresses to forward to. For the correct formatting and configuration of such a file you'll really need to dig into the documentation of your e-mail server.
Thanks all!
You've put me in the right direction and I ended up writing a script that reads the Drupal's users table and configures the mail server accordingly.
I've turned it into a small Python library for WebFaction, available at http://code.google.com/p/drupal2mail.
Hope it's useful for some!
I'm wondering how I could map an email adress so newsletter users could simply write to a uniquely create email address and instantly get unsubscribed.
ex:
jonh.unsubscribe.sdfg87s544fsdg6#exemple.com
And the key here is that I want it to be instantaneous, I don't want to poll a imap or pop3 account every X seconds. Is there a way to listen to the inbox? Thats my main problem... once I get the email I know what to do.
Thecnologies I use:
Postfix
Python
PHP
If your mail server supports it, what you are looking for is IMAP IDLE (https://www.rfc-editor.org/rfc/rfc2177)
Otherwise, you would have to poll.
Mailman does this by redirecting the mail to the program itself (it never goes to a true mailbox). Since you're using Python on your project, it might be helpful to look at how mailman interacts with mail servers.
How can I send email using Perl through my Gmail account? The one CPAN library (Mail::Webmail::Gmail) that I tried didn't work and I don't see much activity with it.
At the moment I really only need to send a message. However, the advanced functionality of getting my contacts, acting when a new email is received that has a certain label, etc. certainly seems appealing for another day.
Did you try Email::Send::Gmail?
You could always send with SMTP. The server is smtp.gmail.com, it requires TLS and uses authentication. You may also have to enable POP/IMAP in your account.
I had the same problem with Mail::Webmail::Gmail, I ended up using Net::IMAP::Simple::SSL to get my mail from gmail. I'd guess if I had to try to send mail with it I would first try Net::SMTP::Server .
I have extended WWW::Contact::GoogleContactsAPI to get all the contact fields. See:
Is there a Perl module to interface to Google Contacts API?