Sending e-mail from Rahti
The procedure is the same as for sending an e-mail from cPouta.
you need to configure your mail transfer agent (MTA) to use the following SMTP relay server (a.k.a. smarthost):
The server does not require authentication.
When sending e-mail, you need a valid
Sender address in your e-mails, such as your university e-mail address, since this will be validated by the SMTP server. Please note that this is a different e-mail header attribute from the
If you want to set up any services on Rahti that generate a large amount of SMTP traffic (e.g. public mailing lists), please contact the CSC Service Desk to coordinate this.
This python script could be used:
#!/usr/bin/env python import smtplib sender = 'firstname.lastname@example.org' receivers = ['email@example.com'] message = """From: SENDER NAME <%s> To: DESTINATION NAME <%s> Subject: SMTP e-mail test This is a test e-mail message. """ % (sender, receivers) try: smtpObj = smtplib.SMTP('smtp.pouta.csc.fi') smtpObj.sendmail(sender, receivers, message) print("Successfully sent email") except SMTPException: print("Error: unable to send email")
- You should replace
firstname.lastname@example.org your email, or the email you want to receive replies to.
- You should replace as well
email@example.com the destination email.