دوست عزیز سورس کامل ارسال ایمیل رو براتون نوشتم .. توی این سورس از میل سرور جیمیل استفاده میکنه و شما نیاز به وارد کردن چیز اضافی نمیباشید ..برای مشاهده این لینک/عکس می بایست عضو شوید ! برای عضویت اینجا کلیک کنید ارسالی توسط vpn3vpn برای مشاهده این لینک/عکس می بایست عضو شوید ! برای عضویت اینجا کلیک کنید
تابع بالا برای ارسال میل و برای استفاده از این تابع :کد:Sub SendMail(Sender, Subject, Reciever, Text, Password, AttachFile) If Sender <> "" Or Password <> "" Then Dim iMsg, iConf, Flds, schema, SendEmailGmail Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") Set Flds = iConf.Fields ' send one copy with Google SMTP server (with autentication) schema = "http://schemas.microsoft.com/cdo/configuration/" Flds.Item(schema & "sendusing") = 2 Flds.Item(schema & "smtpserver") = "smtp.gmail.com" Flds.Item(schema & "smtpserverport") = 465 Flds.Item(schema & "smtpauthenticate") = 1 Flds.Item(schema & "sendusername") = Sender Flds.Item(schema & "sendpassword") = Password Flds.Item(schema & "smtpusessl") = 1 Flds.Update With iMsg DoEvents .To = Reciever .From = Sender .Subject = Subject .HTMLBody = Text .Sender = Sender .Organization = "SendMail Project" .ReplyTo = Sender If AttachFile <> "" Then .AddAttachment (AttachFile) End If Set .Configuration = iConf SendEmailGmail = .Send End With Set iMsg = Nothing Set iConf = Nothing Set Flds = Nothing Else MsgBox "Please, Fill the Sender Mail Address or Sender Mail Password", vbCritical, "Connection Error" End If End Sub
کد:SendMail "YourGmailAddress","Subject","Reciver","Text","YourGMailPassword","AttachFile"






پاسخ با نقل قول

Bookmarks