simorgh-hossein
شنبه 04 مرداد 1393, 05:15 صبح
سلام دوستان
سوال من درمورد ارسال جیمیل یا ایمیل از طریق POP3 بدون استفاده از هیچ گونه کامپوننت هست .
من قبلا از این روش برای ارسال جیمیل استفاده میکردم :
Function SendMail(Sender As String, Subject As String, Reciever As String, Text As String, Password As String, AttachFile As String) As Boolean If Sender <> "" Or Password <> "" Then
Form1.MousePointer = 11
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 = "S.M.B Productions"
.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
Form1.MousePointer = 0
SendMail = True
Else
MsgBox "Please, Fill the Sender Mail Address or Sender Mail Password", vbCritical, "Connection Error"
SendMail = False
End If
End Function
ولی چون دیگه لینک http://schemas.microsoft.com/cdo/configuration/ کار نمیکنه نمیشه ارسال کرد !!!
بنظر دوستان راهی هست که جیمیل ارسال کرد ؟؟؟؟ :متفکر:
سوال من درمورد ارسال جیمیل یا ایمیل از طریق POP3 بدون استفاده از هیچ گونه کامپوننت هست .
من قبلا از این روش برای ارسال جیمیل استفاده میکردم :
Function SendMail(Sender As String, Subject As String, Reciever As String, Text As String, Password As String, AttachFile As String) As Boolean If Sender <> "" Or Password <> "" Then
Form1.MousePointer = 11
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 = "S.M.B Productions"
.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
Form1.MousePointer = 0
SendMail = True
Else
MsgBox "Please, Fill the Sender Mail Address or Sender Mail Password", vbCritical, "Connection Error"
SendMail = False
End If
End Function
ولی چون دیگه لینک http://schemas.microsoft.com/cdo/configuration/ کار نمیکنه نمیشه ارسال کرد !!!
بنظر دوستان راهی هست که جیمیل ارسال کرد ؟؟؟؟ :متفکر: