Mail Component Sorunu

  1. KısayolKısayol reportŞikayet pmÖzel Mesaj
    NightShower
    NightShower's avatar
    Kayıt Tarihi: 17/Temmuz/2005
    Erkek
    bir asp sayfasından mail yollamak için server ın hangi component i desteklediğini nasıl öğrenebiliriz. server ı aramadan
  2. KısayolKısayol reportŞikayet pmÖzel Mesaj
    kaanskaans
    kaans
    kaans's avatar
    Kayıt Tarihi: 26/Aralık/2003
    Erkek
    2 yol gösterebilirim www.aspindir.com dan serverda yüklü olan bileşenleri gösteren bir script indirip çalıştırırsan görebilme ihtimalin var 2. yöntem ise kaç tane bilinen mail bileşeni varki zaten Jmail, aspmail, cdo, cdonts ve smtp mailserver bileşenlerini deneyebilirsin tek tek yada http://www.aspindir.com/goster/1958 linkindeki scripti kurup denemelerini kolaylaştırabilirsin.

    İyi çalışmalar

    Software Developer
  3. KısayolKısayol reportŞikayet pmÖzel Mesaj
    NightShower
    NightShower's avatar
    Kayıt Tarihi: 17/Temmuz/2005
    Erkek
    ok saol işime yaradı.
  4. KısayolKısayol reportŞikayet pmÖzel Mesaj
    NightShower
    NightShower's avatar
    Kayıt Tarihi: 17/Temmuz/2005
    Erkek
    birde söyle bir sorun çıktı yardımvı olabilirseniz sevinirim.



    <%
    kadiye=request.QueryString("kadiy")
    %>
    <%
    set rs = server.createobject("adodb.recordset")
    sql = "select * from uyeler where id="& kadiye
    rs.open sql, conn, 1, 3
    %>

    <%

    '########################
    Sub SendMail(SendTo,From,ReplyTo,Subject,Body,Attachments)

    MailComponent="cdo"'### Defines which email component to use. Valid values are: "jmail", "aspmail", "cdo" or "cdonts" (Note: cdonts only works with the local server, SMTPMailServer is ignored! CDO has problems on some servers.).
    MailServer="localhost"'### SMTP Mailserver to be used to send account information to users.

    SenderIp=Request.ServerVariables("HTTP_X_FORWARDED_FOR")'Sender ip



    ' ### Send mail with jmail
    If LCase(MailComponent="jmail") Then
    Set Msg = Server.CreateObject( "JMail.Message" )
    Msg.ISOEncodeHeaders = false
    Msg.AddRecipient SendTo
    If ReplyTo<>"" Then Msg.ReplyTo = ReplyTo
    Msg.From = From
    Msg.Subject = Subject
    Msg.Body = Body
    If IsArray(Attachments) Then
    For i = 0 To Ubound(Attachments)
    Msg.AddAttachment Attachments(i)
    Next
    End If
    Msg.AddHeader "Originating-IP", SenderIp
    Msg.send(MailServer)
    Msg.close
    Set Msg=Nothing

    ' ### Send mail with AspMail
    ElseIf LCase(MailComponent="aspmail") Then
    Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
    Mailer.FromAddress = From
    Mailer.AddRecipient SendTo,SendTo
    If ReplyTo<>"" Then Mailer.ReplyTo = ReplyTo
    Mailer.Subject = Subject
    Mailer.BodyText = Body
    If IsArray(Attachments) Then
    For i = 0 To Ubound(Attachments)
    Mailer.AddAttachment Attachments(i)
    Next
    End If
    Mailer.AddExtraHeader "Originating-IP: " & SenderIp
    Mailer.RemoteHost = MailServer
    SentOK=Mailer.SendMail
    Set Mailer=Nothing

    ' ### Send mail with Cdonts
    ElseIf LCase(MailComponent="cdonts") Then
    Set objNewMail = Server.CreateObject("CDONTS.NewMail")
    objNewMail.From = From
    If ReplyTo<>"" Then objNewMail.Value("Reply-To") = ReplyTo
    objNewMail.Value("Originating-IP") = SenderIp
    objNewMail.To = SendTo
    objNewMail.Subject =Subject
    objNewMail.Body = Body
    objNewMail.BodyFormat=1
    objNewMail.MailFormat=0
    If IsArray(Attachments) Then
    For i = 0 To Ubound(Attachments)
    objNewMail.AttachFile Attachments(i)
    Next
    End If
    objNewMail.Send
    Set objNewMail = Nothing

    ' ### Send mail with Cdo
    ElseIf LCase(MailComponent="cdo") Then
    Set cdoConfig = Server.CreateObject("CDO.Configuration")
    sch = "http://schemas.microsoft.com/cdo/configuration/"
    cdoConfig.Fields.Item(sch & "sendusing") = 2
    cdoConfig.Fields.Item(sch & "smtpserver") = MailServer
    'cdoConfig.Fields.Item(sch & "authenticate") = 2 'Type of authentication, NONE, Basic (Base64 encoded), NTLM
    'cdoConfig.Fields.Item(sch & "sendusername") = "username"
    'cdoConfig.Fields.Item(sch & "sendpassword") = "parolam"
    cdoConfig.Fields.Item(sch & "smtpserverport") = 25
    'cdoConfig.Fields.Item(sch & "smtpusessl") = False
    cdoConfig.fields.update
    Set objNewMail = Server.CreateObject("CDO.Message")
    Set objNewMail.Configuration = cdoConfig
    objNewMail.From= From
    objNewMail.To= SendTo
    objNewMail.ReplyTo= ReplyTo
    'objNewMail.Cc= SendTo
    'objNewMail.Bcc= SendTo
    objNewMail.Subject=Subject
    objNewMail.TextBody=Body
    'objNewMail.HtmBody = "

    Thtml

    "
    'objNewMail.HtmBody = "file://c|/temp/test.htm"
    'objNewMail.HtmBody = "http://www.smslust.net"

    If IsArray(Attachments) Then
    For i = 0 To Ubound(Attachments)
    objNewMail.AddAttachment Attachments(i)
    Next
    End If
    objNewMail.Send
    Set objNewMail = Nothing
    End If
    End Sub


    SendTo="d@id.com"
    From="d@id.com"
    ReplyTo="sss@dd.com"
    Subject="Kullanıcı Bilgi Formu"
    Body="asas"
    SendMail SendTo,From,ReplyTo,Subject,Body,Attachments

    %>





    mail yollama kodunu bu sayfaya gömdümüğümde hata veriyor.

    verdiği hata

    Hata Tipi:
    (0x8004020F)
    Bu üyeliğin olay sınıfı geçersiz bir bölümde
    /yedek/bilgiform.asp, line 112


    kodu kendi sayfasından kullandığımda çalışıyot ama burada çalışmıyor. yardımlarınız için şimdiden teşekkürler.
  5. KısayolKısayol reportŞikayet pmÖzel Mesaj
    DeAdPaN
    DeAdPaN's avatar
    Kayıt Tarihi: 29/Temmuz/2005
    Erkek
    sen burada mail yollama companentlerinin hepsini bi arada kulanmissin daha dogrusu bu yanilmiyosam aspindirde asp ile mail atma kodlarinin hepsi diye acilan baslik altindaki kodlar. bunlardan herhangi birini secmen gerekiyo.

    serverinda yuklu bilesenleri ogrenmek istiyosan da sunu x.asp diye kaydet server a at ve calistir gorursun

    <% For Each key in Request.ServerVariables %>

    <% = key %>

    <%If Request.ServerVariables(key) = "" Then
    Response.Write " "
    Else
    Response.Write Request.ServerVariables(key)
    End If
    Response.Write ""%>

    <% Next %>


    localhost: <%=Request.ServerVariables("HTTP_HOST")%>



    sorun olursa cem@manyakmiyim.be

  6. KısayolKısayol reportŞikayet pmÖzel Mesaj
    NightShower
    NightShower's avatar
    Kayıt Tarihi: 17/Temmuz/2005
    Erkek
    server cDont bileşenini kullanıyor. sadece o kodu yazıyorum orada sadece ama yine hata veriyor permision hatası veriyor bu server dan kaynaklanan bir sorun mu acaba.
  7. KısayolKısayol reportŞikayet pmÖzel Mesaj
    NightShower
    NightShower's avatar
    Kayıt Tarihi: 17/Temmuz/2005
    Erkek
    server da bir problem varmış maille çözdürdüm mail yollama sorunu kalktı herkeze teşekkürler.

    birde bir şey dah asorsam.

    Set ObjMail = Server.CreateObject("CDONTS.NewMail")
    ObjMail.From = "ad@ad.com"
    ObjMail.To= "ad@ad.com"
    ObjMail.Subject="uye kayıt sormu"
    ObjMail.Body=sifre &" "& kadi
    ObjMail.BodyFormat=1
    ObjMail.MailFormat=0
    ObjMail.Body=sifre &" "& Tel1Num



    ObjMail.BodyFormat=1
    ObjMail.MailFormat=0
    ObjMail.Send

    burada yollanazak mail body bölümüne html kodları yani html bir sayfa şeklinde yollamaya çalışıyorum ama hata veriyor body bölümüne html tag larını nasıl yerleştirecem.

    yardımlarınız için şimdiden teşekkürler.
Toplam Hit: 1483 Toplam Mesaj: 7