I'm writing unit testing for email validation. I'm trying to write a very simple POP3 email listener (using sockets) so the email can be sent to my local machine using something like test@hostnameofmymachine.
I tried to do something like this: http://ift.tt/1x19Pfu
But I don't know on which port the email will be sent so I can't create a socket unless I know which port to listen to.
How can the SMTP server (which sends the message) can know on which port to send the email? (IMAP 143? 993?) (POP3 110? 995?) So I don't know on which port I must listen to.
How can the SMTP know whether the receiver is POP3 or IMAP? How can it know whether SSL is supported?
I'm quite sure I'm missing some important information regarding email protocol.
Aucun commentaire:
Enregistrer un commentaire