Python Emailing - Using Colons Doesn't Exit

A really strange experience with this that took me over an hour to figure out. I have a cgi script written in python that takes form data and sends it by email, the problem was that if the line contained a colon, this could lead to python not returning anything to the email address.

Does anyone know why this is?

For instance:

output = "Print- Customer"

works though:

output = "Print: Customer"

does not display the result.

My email works essentially:

server.sendmail(fromaddr, toaddrs, msg)

where msg = output

Just wondering if the colon is a special character in python string output

+5
source share
2 answers

Colon python, . :

output = "\nPrint: Customer"
+6

:

  • , ( ).
  • python.
  • , "print:".

, , "\r\n", , "print:" , "print -" - .

"\r\n" , .

+2

All Articles