Akasha 0 Posted June 2, 2006 Report Share Posted June 2, 2006 HelloI have an asp webpage with the code for sending an email, this works absolutely fine. No have i copied into a macrofuntion of excel with vbscript.But i getting an error "The transport failed to connect to the server."but in my asp code it works perfect. Sub SaveInformation() Const LastMeeting = 10 Dim Meeting For Meeting = 2 To LastMeeting If Range("A" & Meeting).Value <> "" And Range("B" & Meeting).Value <> "" And Range("C" & Meeting).Value <> "" And _ Range("D" & Meeting).Value <> "" And Range("E" & Meeting).Value <> "" Then If Range("F" & Meeting).Value = "" Then Const cdoSendUsingMethod = "http://schemas.microsoft.com/cdo/configuration/sendusing" Const cdoSendUsingPort = 2 Const cdoSMTPServer = "http://schemas.microsoft.com/cdo/configuration/smtpserver" Const cdoSMTPServerCOS = "[I]myserver name[/I]" Const cdoSMTPServerPort = "http://schemas.microsoft.com/cdo/configuration/smtpserverport" Const cdoSMTPServerPortCOS = 25 Const cdoSMTPConTimeout = "http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout" Const cdoSMTPConTimeoutCOS = 5 Dim objConfig ' As CDO.Configuration Dim objMessage ' As CDO.Message Dim Fields ' As ADODB.Fields ' Get a handle on the config object and it's fields Set objConfig = CreateObject("CDO.Configuration") Set Fields = objConfig.Fields ' Set config fields we care about With Fields .Item(cdoSendUsingMethod) = cdoSendUsingPort .Item(cdoSMTPServer) = cdoSMTPServerCOS .Item(cdoSMTPServerPort) = cdoSMTPServerPortCOS .Item(cdoSMTPConTimeout) = cdoSMTPConTimeoutCOS .Update End With ' Sending a text e-mail Set objMessage = CreateObject("CDO.Message") Set objMessage.Configuration = objConfig With objMessage .To = "nlv15673@prle.natlab.research.philips.com" .From = "administrator@no-reply.com" .Subject = "Notification website ITX" .TextBody = "Best regards" .BodyPart.AddBodyPart.ContentClass = "urn:content-classes:calendarmessage" .BodyPart.AddBodyPart.ContentMediaType = "text/vcalendar; charset=""utf-8""" .Send End With Set objMessage = Nothing Set Fields = Nothing Set objConfig = Nothing Range("F" & Meeting).Value = "Yes" End If End If Next ActiveWorkbook.SaveEnd Sub I want to send an calender invitation to lotus notes.How do i do that and what is wrong with the code above??? Quote Link to post Share on other sites
snowboard01 0 Posted June 2, 2006 Report Share Posted June 2, 2006 The code is beutiful I think that your server blocks the email function most hosts do. I was wondering umm does anyone knoe a host that has php without the security that blocks the most useful functions?Asp would be good to Quote Link to post Share on other sites
Akasha 0 Posted June 2, 2006 Author Report Share Posted June 2, 2006 But when i put the code into my asp file it works fine, so i guess the server isn't blocked right?? Quote Link to post Share on other sites
justsomeguy 1,135 Posted June 5, 2006 Report Share Posted June 5, 2006 Generally, servers and hosts do not place limits on things like that, unless it is a free host. It's probably your ISP, not your host, that is the issue. Most ISPs who give internet service to homes do not allow outgoing email due to spam problems. Quote Link to post Share on other sites
sisicn 0 Posted June 8, 2006 Report Share Posted June 8, 2006 try jmail...it works better Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.