mustafakara Posted May 16, 2013 Share Posted May 16, 2013 sevgili arkadaşlar ben yaptığım bir programa mail gönderme bölümü eklemek istiyorum mail göndermeyle alakalı kodlar elimde var ancak nedense gmail üzerinden gönderiyor ancak hotmail üzerinden göndermiyor her ikisindende gönderebileceğim bir kod yazabilirmisiniz bana teşekkürler Quote Link to comment Share on other sites More sharing options...
blackman12 Posted May 16, 2013 Share Posted May 16, 2013 gmailin smtp adresi falan belli outlookunkini bilmiyorum. ama hangi mail üzerinden gönderdiğinin bir önemi yok ki gönderen kısmına istediğin bilgiyi girebilirsin sonuçta. Quote Link to comment Share on other sites More sharing options...
mesale0077 Posted May 16, 2013 Share Posted May 16, 2013 gmail için örnek paylaşırsanız memnun oluruz kod üzerinden gitmek isteriz :) Quote Link to comment Share on other sites More sharing options...
reyiz Posted May 16, 2013 Share Posted May 16, 2013 (edited) Verdiğim adreste gerekli SMTP ayarları yazılı.http://windows.microsoft.com/tr-tr/windows/outlook/send-receive-from-app (POP3 ve SMTP'yi destekleyen uygulamalar) gmailin smtp adresi falan belli outlookunkini bilmiyorum. ama hangi mail üzerinden gönderdiğinin bir önemi yok ki gönderen kısmına istediğin bilgiyi girebilirsin sonuçta. Hocam olmayan adresten nasıl e-posta gönderebiliriz? Belki vardır öyle bir şey ama ben bilmiyorum. Kolay gelsin. Edited May 16, 2013 by reyiz Quote Link to comment Share on other sites More sharing options...
mustafakara Posted May 16, 2013 Author Share Posted May 16, 2013 işte arkadaşlar bu örnekle gmail üzerinden gönderebiliyorum ama hotmail de olmuyor yardımcı olursanız memnun olurum örnek: #Include<file.au3> $ToAddress = "[email protected]" ; destination address of the email - REQUIRED $FromName = "mustafa karabunar" $Subject = "önemli" $Body = "mail deneme" $AttachFiles = "c:\\boot.ini" ; the file you want to attach- leave blank if not needed $Importance = "high" ; Send message priority: "High", "Normal", "Low" Global $oMyRet[2] Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") _BL_SEND_GMAIL($ToAddress,$FromName,$Subject,$Body,$AttachFiles,$Importance) Func _BL_SEND_GMAIL($ToAddress,$FromName = "",$Subject = "",$Body = "",$AttachFiles = "",$Importance = "Normal") Local $SmtpServer = "smtp.gmail.com" ; address for the smtp-server to use - REQUIRED Local $Username = "benim adresim" Local $Password = "benim şifrem" ;~ Local $IPPort = 25 ; port used for sending the mail ;~ Local $ssl = 0 ; enables/disables secure socket layer sending - put to 1 if using httpS ;~ Local $CcAddress = "[email protected]" ; address for cc - leave blank if not needed ;~ Local $BccAddress = "[email protected]" ; address for bcc - leave blank if not needed Local $CcAddress = "" ; address for cc - leave blank if not needed Local $BccAddress = "" ; address for bcc - leave blank if not needed Local $IPPort=465 ; GMAIL port used for sending the mail Local $ssl=1 ; GMAILenables/disables secure socket layer sending - put to 1 if using https Local $FromAddress = $Username & "@gmail.com" Local $rc = _INetSmtpMailCom($SmtpServer, $FromName, $FromAddress, $ToAddress, $Subject, $Body, $AttachFiles, $CcAddress, $BccAddress, $Importance, $Username, $Password, $IPPort, $ssl) If @error Then MsgBox(0, "Mesaj gönderilirken hta oluştu", "Error code:" & @error & " Description:" & $rc) EndIf EndFunc ; The UDF Func _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject = "", $as_Body = "", $s_AttachFiles = "", $s_CcAddress = "", $s_BccAddress = "", $s_Importance="Normal", $s_Username = "", $s_Password = "", $IPPort = 25, $ssl = 0) Local $objEmail = ObjCreate("CDO.Message") $objEmail.From = '"' & $s_FromName & '" <' & $s_FromAddress & '>' $objEmail.To = $s_ToAddress Local $i_Error = 0 Local $i_Error_desciption = "" If $s_CcAddress <> "" Then $objEmail.Cc = $s_CcAddress If $s_BccAddress <> "" Then $objEmail.Bcc = $s_BccAddress $objEmail.Subject = $s_Subject If StringInStr($as_Body, "<") And StringInStr($as_Body, ">") Then $objEmail.HTMLBody = $as_Body Else $objEmail.Textbody = $as_Body & @CRLF EndIf If $s_AttachFiles <> "" Then Local $S_Files2Attach = StringSplit($s_AttachFiles, ";") For $x = 1 To $S_Files2Attach[0] $S_Files2Attach[$x] = _PathFull($S_Files2Attach[$x]) ConsoleWrite('@@ Debug(62) : $S_Files2Attach = ' & $S_Files2Attach & @LF & '>Error code: ' & @error & @LF) ;### Debug Console If FileExists($S_Files2Attach[$x]) Then $objEmail.AddAttachment ($S_Files2Attach[$x]) Else ConsoleWrite('!> File not found to attach: ' & $S_Files2Attach[$x] & @LF) SetError(1) Return 0 EndIf Next EndIf $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = $s_SmtpServer If Number($IPPort) = 0 then $IPPort = 25 $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = $IPPort ;Authenticated SMTP If $s_Username <> "" Then $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = $s_Username $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = $s_Password EndIf If $ssl Then $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True EndIf ;Update settings $objEmail.Configuration.Fields.Update ; Set Email Importance Switch $s_Importance Case "High" $objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = "High" Case "Normal" $objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = "Normal" Case "Low" $objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = "Low" EndSwitch $objEmail.Fields.Update ; Sent the Message $objEmail.Send If @error Then SetError(2) Return $oMyRet[1] EndIf $objEmail="" EndFunc ;==>_INetSmtpMailCom ; ; ; Com Error Handler Func MyErrFunc() $HexNumber = Hex($oMyError.number, 8) $oMyRet[0] = $HexNumber $oMyRet[1] = StringStripWS($oMyError.description, 3) ConsoleWrite("### COM Error ! Number: " & $HexNumber & " ScriptLine: " & $oMyError.scriptline & " Description:" & $oMyRet[1] & @LF) SetError(1); something to check for when this function returns Return EndFunc ;==>MyErrFunc Quote Link to comment Share on other sites More sharing options...
reyiz Posted May 16, 2013 Share Posted May 16, 2013 Yukarıda yazdığımı denediniz mi? Ayrıca hesabınızda POP3 ve SMTP desteğini açmayı unutmayın. Güvenlik amaçlı kapalıdır. Kolay gelsin. Quote Link to comment Share on other sites More sharing options...
mustafakara Posted May 16, 2013 Author Share Posted May 16, 2013 sevgili reyiz az önce inceledim gerekli ayarları yaptım ancak yinede gönderemedim şimdi hesabıma girip diğer ayarlara bakacağım teşekkürler kolay gelsin Quote Link to comment Share on other sites More sharing options...
mustafakara Posted May 16, 2013 Author Share Posted May 16, 2013 sevgili reyiz söyleminize ilişkin herhangibir ayara rastlamadım malesef Quote Link to comment Share on other sites More sharing options...
reyiz Posted May 16, 2013 Share Posted May 16, 2013 Mail ayarları kısmında var. Olmadı POP3 kullanabilirsiniz. Kolay gelsin.. Quote Link to comment Share on other sites More sharing options...
mustafakara Posted May 17, 2013 Author Share Posted May 17, 2013 malesef hotmail de bu dediğiniz yok durumumdan dolayı belki ben fark edemedim diye başka arkadaşa baktırdım ancak seçenekler içersinde sadece silmeye ilişkin böyle bir ayara rastladık arkadaşlar en azından yukarıdaki örnek üzerinden yardımcı olabilirmisiniz Quote Link to comment Share on other sites More sharing options...
mustafakara Posted May 17, 2013 Author Share Posted May 17, 2013 arkadaşlar ipport u 25 ten 587 yaptığımda sunucu gönderenin adresini redetti sunucunun yanıtı 530.5.0 start tls command gibi bir yanıt alıyorum port 25 te ise sunucuya bağlanamadı yanıtı alıyorum lütfen yardım sanıyorum tls yi eklemem gerekecek nasıl yaparım Quote Link to comment Share on other sites More sharing options...
mesale0077 Posted May 17, 2013 Share Posted May 17, 2013 Local $SmtpServer ="smtp.live.com" Local $IPPort="587" Local $ssl=1 ; bunu 1 yada 0 olarak deneyiniz en yukarıdaki ayarları değiştirip deneyiniz aşağıdaki port 25 oynamayınız böyle deneyiniz lakin msn bu destegi sağlamıyor diyor eğer çalışırsa kodları paylaşırsanız memnun oluruz kolay gelsin Quote Link to comment Share on other sites More sharing options...
mustafakara Posted May 17, 2013 Author Share Posted May 17, 2013 önerdiğiniz ayarların hepsini daha önce denedim malesef çalışmıyor autoit formlarınada baktım herşey aynı neden bilmiyorum ama olmuyor bu konuyu iyi bilen bir arkadaş mail alma ve mail gönderme hakkında bilgi berirse memnun olacağız Quote Link to comment Share on other sites More sharing options...
reyiz Posted May 17, 2013 Share Posted May 17, 2013 Hotmail ve Outlook zaten SMTP ile sorun çıkartıyorlar. POP3 kullanmanız daha iyi olacaktır ve sorunlarınızı çözecektir.http://www.autoitscript.com/forum/topic/55881-pop3-email-udfs/ Kolay gelsin.. Quote Link to comment Share on other sites More sharing options...
mustafakara Posted May 17, 2013 Author Share Posted May 17, 2013 inceledim ancak pek birşey anlamadım pop3 e ilişkin bir örnek verebilirmisiniz mail göndermeyle alakalı teşekkürler Quote Link to comment Share on other sites More sharing options...
reyiz Posted May 17, 2013 Share Posted May 17, 2013 Bu konuyu da inceleyiniz:http://www.autoitscript.com/forum/topic/64051-working-gmail-ssl-pop3-script/ Hotmail ile ilgilide bir SMTP örneği buldum az önce:http://www.autoitscript.com/forum/topic/23860-smtp-mailer-that-supports-html-and-attachments/ Kolay gelsin.. Quote Link to comment Share on other sites More sharing options...
reyiz Posted May 17, 2013 Share Posted May 17, 2013 IMAP ile de yapabilirsiniz.http://www.autoitscript.com/forum/topic/81811-imap-mail-client-night-work/ Kolay gelsin... Quote Link to comment Share on other sites More sharing options...
mesale0077 Posted May 17, 2013 Share Posted May 17, 2013 hotmail ile örnek paylaşırmısın reyiz gözünü seveyim önceden yapıyordu lakin şimdi bu desteği sağlamııyor ama protokol ve destekten gerekli ayarları yapılırsa bilemem kod olarak hotmail ile çalışan yok gibi bence hotmali yada live bu servisi sağlıyorsa kodlarını paylaşınız kolay gelsin Quote Link to comment Share on other sites More sharing options...
reyiz Posted May 17, 2013 Share Posted May 17, 2013 Aynen, önceden çalışıyordu. Şimdi denediğim hiçbir örnek çalışmıyor. Bu programla göndermeyi dener misiniz? Çalışırsa command line ile sessiz bir hale getirebiliriz.http://www.tbare.com/software/swithmail/ Çalışmazsa da sorun Microsoft'la alakalı demektir. Quote Link to comment Share on other sites More sharing options...
mustafakara Posted May 20, 2013 Author Share Posted May 20, 2013 arkadaşlar herkese teşekkürler tatil nedeniyle konunun takipçisiolamadım o yüzden örneklere ancak şimdi bakıyorum ilk olarak SwithMail.exe programına baktım ancak uygulama düzgün başlayamadı iletisi aldım diğer verilen linklere bakacağım teşekkürler bilen bir arkadaş bu konuya örnek verirse memnun olurum herkese kolay gelsin Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.