DjTurkisH Posted June 29, 2014 Share Posted June 29, 2014 (edited) autoit de mail qönderme var mı ? varsa nasıl yapılıyor ??? bide bu var ama qöndermiyor ?? Local $s_SmtpServer = "e-posta" Local $s_FromName = "isim" Local $s_FromAddress = "e-posta" Local $s_ToAddress = "To eMail Address" Local $s_Subject = "My Test UDF" Local $as_Body[2] $as_Body[0] = "Testing the new email udf" $as_Body[1] = "Second Line" Local $iResponse = _INetSmtpMail($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body) Local $iErr = @error If $iResponse = 1 Then MsgBox($MB_SYSTEMMODAL, "Success!", "Mail sent") Else MsgBox($MB_SYSTEMMODAL, "Error!", "Mail failed with error code " & $iErr) EndIf Edited June 29, 2014 by DjTurkisH Quote Link to comment Share on other sites More sharing options...
blackman12 Posted June 29, 2014 Share Posted June 29, 2014 Func _INetSmtpMailCom($s_FromName, $s_FromAddress,$s_ToAddress, $s_Subject , $as_Body , $s_AttachFiles = "",$s_Importance="Normal") Local $objEmail = ObjCreate("CDO.Message") $objEmail.From = '"' & $s_FromName & '" <' & $s_FromAddress & '>' $objEmail.To = $s_ToAddress Local $i_Error = 0 Local $i_Error_desciption = "" $objEmail.Subject = $s_Subject If StringInStr($as_Body, "<") And StringInStr($as_Body, ">") Then $objEmail.HTMLBody = $as_Body Else $objEmail.Textbody = $as_Body & @CRLF &@CRLF &$s_FromAddress EndIf If $s_AttachFiles <> "" Then Local $S_Files2Attach = StringSplit($s_AttachFiles, "|") For $x = 1 To $S_Files2Attach[0] $objEmail.AddAttachment($S_Files2Attach[$x]) 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") = "smtp.gmail.com" $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465 $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "BURAYA ÜZERİNDEN MAİL GÖNDERİLECEK GMAİL ADRESİ" $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "BURAYA ONUN ŞİFRESİ" $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True $objEmail.Configuration.Fields.Update ;$s_Importance: High, Low, Normal değerlerini alır. $objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = $s_Importance EndSwitch $objEmail.Fields.Update $objEmail.Send If @error Then Return 0 $objEmail="" EndFunc Quote Link to comment Share on other sites More sharing options...
DjTurkisH Posted July 26, 2014 Author Share Posted July 26, 2014 mesaj ı Nere Yazcaz 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.