Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_components thread: attachment with aspmail


Message #1 by "vincent vandermeeren" <vincentvdm@o...> on Thu, 23 Nov 2000 08:38:07 -0000
Hi guys,

I have a small problemm

I'm makign a site for a guys who has also a webcam in his dancing and he

wants to enable that someone can send his picture from the page to someoen

else.

There he is using not the server of teh leasedline but the serverhosting

off his ISP. with the command oMail.Attachurl

"d:\sites\www\ecards\qkill.jpg", "qkill.jpg"

at his server that works but he wants to use the hostign of the asp and

there I don't know the path and he (the webmaster of that isp) says I have

to use the virtual path but how do i tell him that with oMail.AttachURL

it works with oMail. Attach file but then he doesn't do the HTML part

corectly (the picture is there as attachment but he doesn't read the

picture who attached to it).

can someone help me ???

Below here you find my code.

*************************************************************************



set oMail = server.CreateObject ("CDONTS.NewMail")

oMail.from = sender

oMail.to = recipient

oMail.subject = "You have recived a E-greetingcard !!"



'prepare body

mBody = "<html>"

mBody = mBody & "<body>"

mBody = mBody & "<table border=""0"" width=""100%"" height=""100%"">"

mBody = mBody & "<tr>"

mBody = mBody & "<td width=""100%"" valign=""middle"" align=""center"">"

mBody = mBody & "<img border=""0"" src=""qkill.jpg"" width=""356"" height=""346""></td>"

mBody = mBody & "</tr>"

mBody = mBody & "<tr>"

mBody = mBody & "<td width=""100%"" valign=""middle"" align=""center"">"

mBody = mBody & "<p align=""center"">" & boodschap

mBody = mBody & "</td></tr>"

mBody = mBody & "<tr>"

mBody = mBody & "<td width=""100%"" valign=""middle"" align=""center"">"

mBody = mBody & "<p align=""center"">This message has been send by <a href=""http://10.0.3.16/vinnie"">Vinnies
Intranetsite</a></p>"

mBody = mBody & "</table>"

mBody = mBody & "</body>"

mBody = mBody & "</html>"



'ready to goattach

oMail.Attachurl "d:\sites\www\ecards\qkill.jpg", "qkill.jpg"

oMail.body = mBody

oMail.BodyFormat = 0 

oMail.MailFormat = 0 



'send mail

oMail.send



'clean up

set oMail = nothing

Message #2 by Robert Chartier <rchartierh@a...> on Thu, 23 Nov 2000 10:12:48 -0500
server.mappath()







http://www.aspfree.com/devlinks/search.asp?file404=3Dserver;mappath#Specific

_ASP_Links





At 01:57 PM 11/23/00, you wrote:

>Hi guys,

>I have a small problemm

>I'm makign a site for a guys who has also a webcam in his dancing and he

>wants to enable that someone can send his picture from the page to someoen

>else.

>There he is using not the server of teh leasedline but the serverhosting

>off his ISP. with the command oMail.Attachurl

>"d:\sites\www\ecards\qkill.jpg", "qkill.jpg"

>at his server that works but he wants to use the hostign of the asp and

>there I don't know the path and he (the webmaster of that isp) says I have

>to use the virtual path but how do i tell him that with oMail.AttachURL

>it works with oMail. Attach file but then he doesn't do the HTML part

>corectly (the picture is there as attachment but he doesn't read the

>picture who attached to it).

>can someone help me ???

>Below here you find my code.

>*************************************************************************

>

>set oMail =3D server.CreateObject ("CDONTS.NewMail")

>oMail.from =3D sender

>oMail.to =3D recipient

>oMail.subject =3D "You have recived a E-greetingcard !!"

>

>'prepare body

>mBody =3D "<html>"

>mBody =3D mBody & "<body>"

>mBody =3D mBody & "<table border=3D""0"" width=3D""100%"" height=3D""100%""

>"

>mBody =3D mBody & "<tr>"

>mBody =3D mBody & "<td width=3D""100%"" valign=3D""middle""

 align=3D""center"">"

>mBody =3D mBody & "<img border=3D""0"" src=3D""qkill.jpg"" width=3D""356""



>height=3D""346""></td>"

>mBody =3D mBody & "</tr>"

>mBody =3D mBody & "<tr>"

>mBody =3D mBody & "<td width=3D""100%"" valign=3D""middle""

 align=3D""center"">"

>mBody =3D mBody & "<p align=3D""center"">" & boodschap

>mBody =3D mBody & "</td></tr>"

>mBody =3D mBody & "<tr>"

>mBody =3D mBody & "<td width=3D""100%"" valign=3D""middle""

 align=3D""center"">"

>mBody =3D mBody & "<p align=3D""center"">This message has been send by <a



>href=3D""http://10.0.3.16/vinnie"">Vinnies Intranetsite</a></p>"

>mBody =3D mBody & "</table>"

>mBody =3D mBody & "

>---<BR>

>.NET Runtime components or build your own ASP+<BR>

>Decisions. Decisions!<BR>

>Wrox Professional Web Developer Conference<BR>

>29 November =AD 1 December<BR>

>http://www.wroxconferences.com/WebdevEurope?mid038<BR>

>---<BR>


 rchartierh@a...<BR>


>$subst('Email.Unsub')<BR>

>

></BODY>"

>mBody =3D mBody & "</html>"

>

>'ready to goattach

>oMail.Attachurl "d:\sites\www\ecards\qkill.jpg", "qkill.jpg"

>oMail.body =3D mBody

>oMail.BodyFormat =3D 0

>oMail.MailFormat =3D 0

>

>'send mail

>oMail.send

>

>'clean up

>set oMail =3D nothing





Robert Chartier

Author, AspFree.com

xxx-xxx-xxxx

rchartierh@a...

http://www.aspfree.com/devlinks

http://www.aspfree.com/authors/robert

http://www.aspalliance.com/nothingmn




  Return to Index