<%
objCDOMail.From = "www.europenytt.com <europenytt@telia.com>"
--> till
objCDOMail.From = "europenytt@telia.com"
%>
Hej igen!
Nu börjar jag få ordning på mitt annonsskript. Mitt och mitt.... det är nerladdat gratis (såklart ) och jag modifierar det efter min hemsida.
Men den stora stötestenen är att jag inte får iväg mina mail till annonsörerna där de ska bekräfta sin annons.
Ett fint meddelande om att mailet går iväg får jag men mailet kommer aldrig fram...
En kontroll om vad som finns installerat på vår server (med hjälp av tråden http://www.webforum.nu/showthread.php?s=&threadid=67307&highlight=Jmail
ger svaret att jag har CDONTS (TRUE)
Här kommer två kodsnuttar från två olika dokument. Hoppas någon kan säga vad som skulle kunna vara fel. Just nu står det mer än still i huvudet...
<%
Dim objCDOMail, strBody
'Initialse strBody string with the body of the e-mail
strBody = "Hej, detta är ett automatiskt sänt svar från [url]www.europenytt.com[/url] angående en inlagd annons. Om detta mail är felaktigt utskickat eller betraktas som spam så vänligen kasta det i papperskorgen. Annars för att godkänna din inlagda annons, så klicka på följande länk för att godkänna den. <a href='http://europe.no-ip.com/dd/sell/approve.asp?ID=" & postid & "&rand=" & randpassword & "'" & ">Jag godkänner</a>."
'Create the e-mail server object
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
'Who the e-mail is from (this needs to have an e-mail address in it for the e-mail to be sent)
objCDOMail.From = "www.europenytt.com <europenytt@telia.com>"
'Who the e-mail is sent to
objCDOMail.To = visitoremail
'Set the e-mail body format (0=HTML 1=Text)
objCDOMail.BodyFormat = 0
'Set the mail format (0=MIME 1=Text)
objCDOMail.MailFormat = 0
'Set the subject of the e-mail
objCDOMail.Subject = "Bekräftelse av annons"
'Set the main body of the e-mail
objCDOMail.Body = strBody
'Importance of the e-mail (0=Low, 1=Normal, 2=High)
objCDOMail.Importance = 1
'Send the e-mail
objCDOMail.Send
'Close the server object
Set objCDOMail = Nothing
%>
Och nästa då som är ett utdrag ur ett längre dokument...
'Create the e-mail server object
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
'Who the e-mail is from (this needs to have an e-mail address in it for the e-mail to be sent)
objCDOMail.From = "europenytt@telia.com " & sendername & "europenytt@telia.com" & ""
'Who the e-mail is sent to
objCDOMail.To = RS("Email")
'Set the e-mail body format (0=HTML 1=Text)
objCDOMail.BodyFormat = 0
'Set the mail format (0=MIME 1=Text)
objCDOMail.MailFormat = 0
'Set the subject of the e-mail
objCDOMail.Subject = subject
'Set the main body of the e-mail
objCDOMail.Body = strBody
'Importance of the e-mail (0=Low, 1=Normal, 2=High)
objCDOMail.Importance = 1
'Send the e-mail
objCDOMail.Send
'Close the server object
Set objCDOMail = Nothing
end if

