Re: Sending mail with VB 6.0
Welcome to the forums. :wave:
Are you sure Port 25 is the right port?
Re: Sending mail with VB 6.0
This is from documentation of the library - "The SMTP port on the remote host. This property has a default value of 25, which conforms to the SMTP standard. Unless you are sending mail via a machine where the SMTP port was changed to a non-standard value, you don't have to set this property."
Re: Sending mail with VB 6.0
Some ISP's block port 25 as its commonly abused by apps for sending spam.
You may need to put into your app a option to enter in the desired port number that their ISP will allow in these cases. A common bypass is port 2525.
Re: Sending mail with VB 6.0
Ok,there is something else,this code must be working properly but here is the problem,i tried with SMTPHost of another mail "smtp.icmail.net" and doesn't work.After that i tried with "smtp.gmail.com" of course i've changed port and other things and when i run the program i get the following message in the Status event
"Connecting to POP3 server (mail.icmail.net" and after that an error which says that the password or username is wrong.Note that i use the code below!!!!!***?What POP3 server,what "mail.icmail.net"???For second time...i'm using the posted code below.The program always tries to connect to "mail.icmail.net" :eek: I've created new project which use the same code but the same thing happens. :(
Re: Sending mail with VB 6.0
most of the vbsendmail settings are saved in the registry, though it appears that your code should still connect to the correct server,
put a breakpoint on the send line and test the value of smtphost and port
Re: Sending mail with VB 6.0
Some free mail services dont allow smtp connections like what vbSendMail is trying to do.