[Tutor] Variables in email addresses

Oliver Mercer-Deadman oliver at ollymd.co.uk
Wed Jun 17 03:05:49 CEST 2015


Hi I am a complete newbie but am hoping to learn some python for a
particular project. Before I hurl myself in I would like to know if a key
element is going to be possible.

I will need to be able to use a variable as the username in an email
address. E.G.

username = Input("Enter Something: ")

Then later when sending email with SMTP
to_addr = 'username at mycompany.com'

I realise that it is probably not correct, I am only in the foothills, but
in principal can it be done?

Thanks,
Ozzy


More information about the Tutor mailing list