How To Send Emails On Desktop

Big Dave

Member
Licensed User
Longtime User
I am trying to send an email (as a test) on the desktop. Never done this before so have a few questions.

1. Do I have to use outlook or can I use hotmail.
2. How do I identify the 'host' and port number to use.

Srry if the above is confusing, let me know if you need more information.

Thanks

David:sign0104:
 

sitajony

Active Member
Licensed User
Hi, I've just one idea but there's surely a better way:
You can create a PHP file if you've a server and type the mail() function and use the Get variable and on B4P you use HTTP.dll...
But I repeat there's a better way I think...
Good Luck ;)
 

Big Dave

Member
Licensed User
Longtime User
Example of what I am trying to do

Thanks for your reply. I have been trying to use the example in the help file:..

Smtp.New1("host",587,"signon","password")
Msg.New1
Msg.AddTo("[email protected],[email protected]")
Msg.Subject = "Important mail"
Msg.Body = "Hi," & CRLF & "How are you doing?"
'Msg.AddAttachment(AppPath & "\SomeDocument.doc")
Msg.From = "[email protected]"
Smtp.Send(Msg.Value)
Msgbox("Message was sent.")

The program fails on the smtp.send line complaining about the host. I do not know what to set this to or what to set the port number to. I would like to use hotmail if possible as I have a hotmail address but I would use outlook if neessary.

The message that I get is 'unable to connect to remote server' and then something about a timeout or failure of the connected host to respond. An ip address is also detailed.

Thanks

David:sign0085:
 
Last edited:

Big Dave

Member
Licensed User
Longtime User
Finally Got It To Work

Sitajony

Thanks for your help, finally managed to get it to send my hotmail email...

Smtp.New1("smtp.live.com",587,"[email protected]","password")
Msg.New1
Msg.AddTo("[email protected],[email protected]")
Msg.Subject = "Important mail"
Msg.Body = "Hi," & CRLF & "How are you doing?"
'Msg.AddAttachment(AppPath & "\SomeDocument.doc")
Msg.From = "[email protected]"
Smtp.UseSSL = True
Smtp.Send(Msg.Value)
Msgbox("Message was sent.")

I have obviously changed the email addresses and passwords for privacy but it does work. The key to success was adding the smtp.usessl=true line. It may be a bit basic but as they say ' it works for me'.

Again thanks.

David:):)
 
Top