views:

81

answers:

5

The email addresses are stored in a database and the number of people to be emailed each day is variable. I'm not sure yet whether the emails would need to be sent individually or as a mass email. I want recommendations as to what language to use to do this and any other components necessary in a solution.

thanks

A: 

I want recommendations as to what language to use to do this and any other components necessary in a solution

You can do this in whatever language you feel comfortable with. .NET has some nice stuff built in, and you can probably do it in less than 20 lines of code.

rockinthesixstring
+1  A: 

Here is a C# implementation for this:

System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage("[email protected]", "[email protected]", "subject", "body");
System.Net.Mail.SmtpClient client = new System.Net.Mail.SmtpClient("host.address.com", 1234);
client.Send(message);
Jake
+2  A: 

Just about any modern language can do this. Java, C#, VB.NET, PHP, PERL, Python and many many more.

Sending emails is such a common requirement that most languages and frameworks support it natively.

As for the requirement of up to 1000 emails a day - that's not that many emails and the limiting factor will be limits imposed by an ISP most likely.

In short - use the language and platform you are most comfortable with and find out how email works in that.

Oded
+1  A: 

As others have mentioned, it's easy to do this in just about any modern language. I'm a fan of Python, which features great scripting capabilities as well as a solid base for building applications. Python's library is well documented, and includes a number of sophisticated features (including the ability to do multipart MIME encoding).

This is from the examples:

# Import smtplib for the actual sending function
import smtplib

# Import the email modules we'll need
from email.mime.text import MIMEText

# Open a plain text file for reading.  For this example, assume that
# the text file contains only ASCII characters.
fp = open(textfile, 'rb')
# Create a text/plain message
msg = MIMEText(fp.read())
fp.close()

# me == the sender's email address
# you == the recipient's email address
msg['Subject'] = 'The contents of %s' % textfile
msg['From'] = me
msg['To'] = you

# Send the message via our own SMTP server, but don't include the
# envelope header.
s = smtplib.SMTP()
s.sendmail(me, [you], msg.as_string())
s.quit()
Chris B.
+1  A: 
Norman Ramsey