hey all, im looking to code a program that i can use my own smtp server to send mail to others. Also if at all possible i want to make it so that u can send anonymously. Ive looked around for sending mail with C++ but cant seem to grasp it so i thought i check the suck-o members and see what they suggested.
thanks in advance for any helps
/
Emailing program
Python
Quick look on google I came across this for python
reference
And theres lots of references to C++ Sending email on google... Do your homework
Code: Select all
import smtplib
def mail(serverURL=None, sender='', to='', subject='', text=''):
"""
Usage:
mail('somemailserver.com', 'me@example.com', 'someone@example.com', 'test', 'This is a test')
"""
headers = "From: %s\r\nTo: %s\r\nSubject: %s\r\n\r\n" % (sender, to, subject)
message = headers + text
mailServer = smtplib.SMTP(serverURL)
mailServer.sendmail(sender, to, message)
mailServer.quit()
Code: Select all
http://www.eskimo.com/~jet/python/examples/mail/smtp1.html
And theres lots of references to C++ Sending email on google... Do your homework
- F4LSE
- Fame ! Where are the chicks?!
- Posts: 236
- Joined: 02 Jul 2007, 16:00
- 16
- Location: My Lab
- Contact:
Re: Python
lol aright well i suppose ill give another whirl and see what i can come up with. thanksMaboroshi wrote:Quick look on google I came across this for python
referenceCode: Select all
import smtplib def mail(serverURL=None, sender='', to='', subject='', text=''): """ Usage: mail('somemailserver.com', 'me@example.com', 'someone@example.com', 'test', 'This is a test') """ headers = "From: %s\r\nTo: %s\r\nSubject: %s\r\n\r\n" % (sender, to, subject) message = headers + text mailServer = smtplib.SMTP(serverURL) mailServer.sendmail(sender, to, message) mailServer.quit()
Code: Select all
http://www.eskimo.com/~jet/python/examples/mail/smtp1.html
And theres lots of references to C++ Sending email on google... Do your homework