#1   Report Post  
Posted to microsoft.public.excel.programming
tom tom is offline
external usenet poster
 
Posts: 570
Default e-mail help

I would like to send a message upon hitting the submit button, but I keep
getting an error message of "the transport failed to connect to the server".
I am connected to the Internet, and do not use out look. Can someone please
help. I have the following code that has already been posted with a few
changes:

Dim iMsg As Object
Dim iConf As Object
Dim strbody As String
Dim Flds As Variant
MessageText = MessageSender.MessageBox


Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")

iConf.Load -1 ' CDO Source Defaults
Set Flds = iConf.Fields
With Flds

..Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1

..Item("http://schemas.microsoft.com/cdo/configuration/sendusername") =
"username"

..Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") =
"password"

..Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

..Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"mail.noblephones.com"

..Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Update
End With

strbody = MessageText

With iMsg
Set .Configuration = iConf
.To = "
.CC = ""
.BCC = ""
.From = "
.Subject = "test"
.TextBody = strbody
.Send
End With

Set iMsg = Nothing
Set iConf = Nothing

End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default e-mail help

hi Tom

Maybe your firewall block it


--
Regards Ron de Bruin
http://www.rondebruin.nl


"tom" wrote in message ...
I would like to send a message upon hitting the submit button, but I keep
getting an error message of "the transport failed to connect to the server".
I am connected to the Internet, and do not use out look. Can someone please
help. I have the following code that has already been posted with a few
changes:

Dim iMsg As Object
Dim iConf As Object
Dim strbody As String
Dim Flds As Variant
MessageText = MessageSender.MessageBox


Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")

iConf.Load -1 ' CDO Source Defaults
Set Flds = iConf.Fields
With Flds

.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1

.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") =
"username"

.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") =
"password"

.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"mail.noblephones.com"

.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Update
End With

strbody = MessageText

With iMsg
Set .Configuration = iConf
.To = "
.CC = ""
.BCC = ""
.From = "
.Subject = "test"
.TextBody = strbody
.Send
End With

Set iMsg = Nothing
Set iConf = Nothing

End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
tom tom is offline
external usenet poster
 
Posts: 570
Default e-mail help

Thanks for your time Ron. It works now. I'm at work, and it works fine. At
home it doesn't. Do I have to have an e-mail program set up in order for the
code to work. I know I don't have one set up at home.
tom
"Ron de Bruin" wrote:

hi Tom

Maybe your firewall block it


--
Regards Ron de Bruin
http://www.rondebruin.nl


"tom" wrote in message ...
I would like to send a message upon hitting the submit button, but I keep
getting an error message of "the transport failed to connect to the server".
I am connected to the Internet, and do not use out look. Can someone please
help. I have the following code that has already been posted with a few
changes:

Dim iMsg As Object
Dim iConf As Object
Dim strbody As String
Dim Flds As Variant
MessageText = MessageSender.MessageBox


Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")

iConf.Load -1 ' CDO Source Defaults
Set Flds = iConf.Fields
With Flds

.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1

.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") =
"username"

.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") =
"password"

.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"mail.noblephones.com"

.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Update
End With

strbody = MessageText

With iMsg
Set .Configuration = iConf
.To = "
.CC = ""
.BCC = ""
.From = "
.Subject = "test"
.TextBody = strbody
.Send
End With

Set iMsg = Nothing
Set iConf = Nothing

End Sub




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default e-mail help

Hi Tom

Do I have to have an e-mail program set up in order ..

No

Check out the firewall at home
And at home you not need the use name and password lines I think ?



--
Regards Ron de Bruin
http://www.rondebruin.nl


"tom" wrote in message ...
Thanks for your time Ron. It works now. I'm at work, and it works fine. At
home it doesn't. Do I have to have an e-mail program set up in order for the
code to work. I know I don't have one set up at home.
tom
"Ron de Bruin" wrote:

hi Tom

Maybe your firewall block it


--
Regards Ron de Bruin
http://www.rondebruin.nl


"tom" wrote in message ...
I would like to send a message upon hitting the submit button, but I keep
getting an error message of "the transport failed to connect to the server".
I am connected to the Internet, and do not use out look. Can someone please
help. I have the following code that has already been posted with a few
changes:

Dim iMsg As Object
Dim iConf As Object
Dim strbody As String
Dim Flds As Variant
MessageText = MessageSender.MessageBox


Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")

iConf.Load -1 ' CDO Source Defaults
Set Flds = iConf.Fields
With Flds

.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1

.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") =
"username"

.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") =
"password"

.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"mail.noblephones.com"

.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Update
End With

strbody = MessageText

With iMsg
Set .Configuration = iConf
.To = "
.CC = ""
.BCC = ""
.From = "
.Subject = "test"
.TextBody = strbody
.Send
End With

Set iMsg = Nothing
Set iConf = Nothing

End Sub






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
E-mail to every e-mail address in an Excel column? MrMan&Fam Excel Discussion (Misc queries) 24 July 19th 06 09:35 AM
Error: cannot load the mail service. Check your mail installation. Brad Bowser Excel Discussion (Misc queries) 0 December 20th 05 10:03 PM
General mail failure when sending e-mail from Excel Adrienne Excel Discussion (Misc queries) 5 November 4th 05 12:59 PM
Creating TWO-WAY E-Mail Attachments with 'BeforeSave Events' in Code for 2nd E-Mail Chuckles123[_112_] Excel Programming 0 September 8th 05 05:56 PM


All times are GMT +1. The time now is 06:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"