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 = 'email@example.com' receivers = ['firstname.lastname@example.org'] 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
email@example.com your email, or the email you want to receive replies to.
- You should replace as well
firstname.lastname@example.org the destination email.
Last edited Wed Sep 16 2020