Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_cdo thread: Re: Can't Send Mail With Exchange Server


Message #1 by "Eli Schilling" <eschilli@t...> on Wed, 9 May 2001 22:17:07
I have tried to use this code but I keep receiving the error:



Object required 'servername'



where servername is the name of my exchange server.  This is how I have 

the server defined:



>  dim mailbody,recip,newSession,newMessage,mailbox,server,profile,address

>  mailbody = request.form("comments")

>  mailbox = request.form("mailbox")

>  server = request.form("server")

>  profile = server & vblf & mailbox

>  address = "eschilli@t..."

>  

>  'Log on

>   set newSession = server.CreateObject("MAPI.session")

>   newSession.logon , , , true, , true, profile

>  'creates a new message

>   newMessage = CurrSession.outbox.messages.add

>   

>  'set the message properties

>   newmessage.subject = "Order Form Submission"

>   newMessage.Text = mailbody

>   newMessage.Update



I tried Ken's code but it told me the - objRecip.Name = "strTo" - is not a 

valid command for this object.  If I comment that out it tells me the same 

thing for 'objNewMessage.Send'



Thanks in advance

Eli Schilling

  Return to Index