/ Forside/ Teknologi / Udvikling / ASP / Tip
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
ASP
#NavnPoint
smorch 9259
Harlekin 1866
molokyle 1040
Steffanst.. 758
gandalf 657
smilly 564
gibson 560
cumano 530
MouseKeep.. 480
10  Random 410
Send en e-mail med attachments / priotet~
rean har modtaget 30 point for dette tip
Fra : rean
Vist : 817 gange

Dato : 06-02-01 13:07

Her er en function som kan sende mail med attachments og priotet.

<%
function SendMail(sTo, sFrom, sPriority, sSubject, sBody, sAttachment, bHTML)
on error resume next
cdoLow = 0 ' Lav priotet
cdoNormal = 1 ' Normal priotet (default)
cdoHigh = 2 ' Høj priotet

cdoBodyFormatHTML = 0
cdoBodyFormatText = 1
cdoMailFormatMime = 0
cdoMailFormatText = 1


'Opret CDONTS komponent.
Set oMailMessage = server.CreateObject("CDONTS.NewMail")
oMailMessage.To = sTo
' Reply to
oMailMessage.Value("Reply-To") = sFrom
oMailMessage.From = sFrom
oMailMessage.subject = sSubject

sPriority = ucase(sPriority)
if sPriority = "LOW" then
oMailMessage.importance = cdoLow
elseif sPriority = "HIGH" then
oMailMessage.importance = cdoHigh
else
oMailMessage.importance = cdoNormal
end if


' Skal beskeden være HTML besked
if bHTML then
oMailMessage.BodyFormat = cdoBodyFormatHTML
oMailMessage.MailFormat = cdoMailFormatMime
else
oMailMessage.BodyFormat = cdoBodyFormatText
oMailMessage.MailFormat = cdoMailFormatText
end if

oMailMessage.Body = sBody

if sAttachment <> "" then
oMailMessage.Attachfile sAttachment
end if

' Send besked.
oMailMessage.Send


set oMailMessage = nothing

if Err then
SendMail = false
else
SendMail = true
end if

end function
%>


 
 
Bedømmelse

Fra : gandalf


Dato : 06-02-01 14:40



Bedømmelse

Fra : gandalf


Dato : 07-02-01 14:51



Bedømmelse

Fra : gandalf


Dato : 07-02-01 14:52



Bedømmelse

Fra : gandalf


Dato : 07-02-01 14:51



Bedømmelse

Fra : gandalf


Dato : 08-02-01 09:17



Du har følgende muligheder
Eftersom du ikke er logget ind i systemet, kan du ikke lave en bedømmelse til dette tip.

Hvis du ikke allerede er registreret, kan du gratis blive medlem, ved at trykke på "Bliv medlem" ude i menuen.
Søg
Reklame
Statistik
Spørgsmål : 177414
Tips : 31962
Nyheder : 719565
Indlæg : 6407849
Brugere : 218876

Månedens bedste
Årets bedste
Sidste års bedste