I'm very new to python and have wrote a simple script to send plaint txt emails via SMTP (Ref: https://realpython.com/python-send-email/). I was wondering if I would be able to in some way include a hyphen as variable name but i'm not having any luck seeing if it's possible. My understanding is that you are cannot use hyphens in python but is there a work around?
The idea is to be able to apply a region as an addtional parameter of the smtp host, however, the regions in aws regions can be quite long to type, so abbreviated would have been great.
For ex. email-smtp.ap-southeast-2.amazonaws.com
is one of the regions in AWS, could this be used as just ap-southeast-2
?
python3 send-email.py -username -password --region ap-southeast-2
I've got everything working but just this.. Open to ideas too!