(Aug-08-2017, 12:38 PM)JamieVanCadsand Wrote: Before you handle with date and time you must be import them.
I am an beginner with python, just i don't know what you try to do,
but here is an code you must start with...
# Import datetime before you handle with this from datetime import datetime # Here your codeIs this the problem ?... but further... i can't help you.
I am learn python and i am pure beginner with this languale.
Try my code... maby this the problem.
Jamie.
Thanks for the help Jamie but its not that simple, the library is not the problem ehehe =P. The problem here is that I want to use my server time date instead of each mail client who seems to be the problem, but I really dont know how to write that field in mail header through python.
So seems that I was able to bypass this problem by removing the Date field from:
message_structure = 'From: %s\nTo: %s\nSubject: %s\n\n%s' %(sender,email_receivers,subject,datetime.datetime.now().strftime("%d/%m/%y %H:%M:%Ss"),message)Now seems that the date is added by the MTA, because it is the same in each email client. I think that the previous date format was not handled properly by the server, leading to this problem.
I forgot to say that I have been using that date format in one exchange server, and I didnt have any problem there, only in this Dovecot(MUA)+Postfix(MTA) server.