Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_cdo thread: SV: RE: How can I send HTML mail with CreateObject("CDO- .Message") ??


Message #1 by Robbin Gille <robbin.gille@n...> on Thu, 5 Jul 2001 13:25:03 +0200
Well I saw that you hade posted the code before. But how can i attach 

files

, I have tried diffrent ways, but i dosen't work..



Robbin



-----Ursprungligt meddelande-----

Fr=E5n: Siegfried Weber [mailto:sweber@c...]

Skickat: den 5 juli 2001 11:32

Till: ASP CDO

=C4mne: [asp_cdo] RE: How can I send HTML mail with

CreateObject("CDO.Message") ??





Posted here more than once. Twice this week.



Having said that, here's the code again:



<!--METADATA TYPE=3D"typelib" 

UUID=3D"CD000000-8B95-11D1-82DB-00C04FB1625D"

NAME=3D"CDO for Windows 2000 Library" -->



Set objConfiguration =3D CreateObject("CDO.Configuration")

Set objFields =3D objConfiguration.Fields

With objFields

	.Item(cdoSendUsingMethod) =3D cdoSendUsingPort

	.Item(cdoSMTPServerPort) =3D 25

	.Item(cdoSMTPServer) =3D "YourMailServer.YourDomain.Com"

	.Update

End With

Set objMessage =3D CreateObject("CDO.Message")

With objMessage

	Set .Configuration =3D objConfiguration

	.From =3D "YourOriginator@Y..."

	.To =3D "TheRecipient@T..."

	.Subject =3D "YourSubject"

	'.TextBody =3D "YourTextBody"

	.Send

End With



<Siegfried/>



> -----Original Message-----

> From: Robbin Gille [mailto:robbin.gille@n...]

> Sent: Thursday, July 05, 2001 10:09 AM

> To: ASP CDO

> Subject: [asp_cdo] How can I send HTML mail with

> CreateObject("CDO.Message") ??

>

> I have a problem, I want to send a mail from a remote SMTP server, 

but

how

> do I do that? I know how I do it width 

CreateObject("CDONTS.NewMail").

But

> if I do it the same way it dosen't work! Why??

>

> Plz help me.

>

> Robbin



Message #2 by "Siegfried Weber" <sweber@c...> on Thu, 5 Jul 2001 14:01:23 +0200
According to the documentation at MSDN:



With objMessage

	Set .Configuration =3D objConfiguration

	.From =3D "YourOriginator@Y..."

	.To =3D "TheRecipient@T..."

	.Subject =3D "YourSubject"

	.TextBody =3D "YourTextBody"

	.AddAttchment "C:\autoexec.bat"

	.Send

End With



Been there, done that, works here.



<Siegfried/>



> -----Original Message-----

> From: Robbin Gille [mailto:robbin.gille@n...]

> Sent: Thursday, July 05, 2001 1:25 PM

> To: ASP CDO

> Subject: [asp_cdo] SV: RE: How can I send HTML mail with

CreateObject("CDO

> .Message") ??

>

> Well I saw that you hade posted the code before. But how can i attach

> files

> , I have tried diffrent ways, but i dosen't work..

>

> Robbin

>

> -----Ursprungligt meddelande-----

> Fr=E5n: Siegfried Weber [mailto:sweber@c...]

> Skickat: den 5 juli 2001 11:32

> Till: ASP CDO

> =C4mne: [asp_cdo] RE: How can I send HTML mail with

> CreateObject("CDO.Message") ??

>

>

> Posted here more than once. Twice this week.

>

> Having said that, here's the code again:

>

> <!--METADATA TYPE=3D"typelib"

UUID=3D"CD000000-8B95-11D1-82DB-00C04FB1625D"

> NAME=3D"CDO for Windows 2000 Library" -->

>

> Set objConfiguration =3D CreateObject("CDO.Configuration")

> Set objFields =3D objConfiguration.Fields

> With objFields

> 	.Item(cdoSendUsingMethod) =3D cdoSendUsingPort

> 	.Item(cdoSMTPServerPort) =3D 25

> 	.Item(cdoSMTPServer) =3D "YourMailServer.YourDomain.Com"

> 	.Update

> End With

> Set objMessage =3D CreateObject("CDO.Message")

> With objMessage

> 	Set .Configuration =3D objConfiguration

> 	.From =3D "YourOriginator@Y..."

> 	.To =3D "TheRecipient@T..."

> 	.Subject =3D "YourSubject"

> 	'.TextBody =3D "YourTextBody"

> 	.Send

> End With

>

> <Siegfried/>



Message #3 by "Siegfried Weber" <sweber@c...> on Thu, 5 Jul 2001 14:02:09 +0200
Sorry. Typo. Correct it should read:



.AddAttachment "C:\autoexec.bat"



<Siegfried/>



> -----Original Message-----

> From: Siegfried Weber

> Sent: Thursday, July 05, 2001 2:01 PM

> To: 'ASP CDO'

> Subject: RE: [asp_cdo] SV: RE: How can I send HTML mail with

> CreateObject("CDO .Message") ??

>

> According to the documentation at MSDN:

>

> With objMessage

> 	Set .Configuration =3D objConfiguration

> 	.From =3D "YourOriginator@Y..."

> 	.To =3D "TheRecipient@T..."

> 	.Subject =3D "YourSubject"

> 	.TextBody =3D "YourTextBody"

> 	.AddAttchment "C:\autoexec.bat"

> 	.Send

> End With

>

> Been there, done that, works here.

>

> <Siegfried/>

>

> > -----Original Message-----

> > From: Robbin Gille [mailto:robbin.gille@n...]

> > Sent: Thursday, July 05, 2001 1:25 PM

> > To: ASP CDO

> > Subject: [asp_cdo] SV: RE: How can I send HTML mail with

> CreateObject("CDO

> > .Message") ??

> >

> > Well I saw that you hade posted the code before. But how can i

attach

> > files

> > , I have tried diffrent ways, but i dosen't work..

> >

> > Robbin

> >

> > -----Ursprungligt meddelande-----

> > Fr=E5n: Siegfried Weber [mailto:sweber@c...]

> > Skickat: den 5 juli 2001 11:32

> > Till: ASP CDO

> > =C4mne: [asp_cdo] RE: How can I send HTML mail with

> > CreateObject("CDO.Message") ??

> >

> >

> > Posted here more than once. Twice this week.

> >

> > Having said that, here's the code again:

> >

> > <!--METADATA TYPE=3D"typelib"

UUID=3D"CD000000-8B95-11D1-82DB-00C04FB1625D"

> > NAME=3D"CDO for Windows 2000 Library" -->

> >

> > Set objConfiguration =3D CreateObject("CDO.Configuration")

> > Set objFields =3D objConfiguration.Fields

> > With objFields

> > 	.Item(cdoSendUsingMethod) =3D cdoSendUsingPort

> > 	.Item(cdoSMTPServerPort) =3D 25

> > 	.Item(cdoSMTPServer) =3D "YourMailServer.YourDomain.Com"

> > 	.Update

> > End With

> > Set objMessage =3D CreateObject("CDO.Message")

> > With objMessage

> > 	Set .Configuration =3D objConfiguration

> > 	.From =3D "YourOriginator@Y..."

> > 	.To =3D "TheRecipient@T..."

> > 	.Subject =3D "YourSubject"

> > 	'.TextBody =3D "YourTextBody"

> > 	.Send

> > End With

> >

> > <Siegfried/>

> >

> > > -----Original Message-----

> > > From: Robbin Gille [mailto:robbin.gille@n...]

> > > Sent: Thursday, July 05, 2001 10:09 AM

> > > To: ASP CDO

> > > Subject: [asp_cdo] How can I send HTML mail with

> > > CreateObject("CDO.Message") ??

> > >

> > > I have a problem, I want to send a mail from a remote SMTP server,

but

> > how

> > > do I do that? I know how I do it width

CreateObject("CDONTS.NewMail").

> > But

> > > if I do it the same way it dosen't work! Why??

> > >

> > > Plz help me.

> > >

> > > Robbin

> >


  Return to Index