#Region Project Attributes
#ApplicationLabel: Send Email
#VersionCode: 1
#VersionName: 1.0
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: False
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These variables can only be accessed from this module.
Dim StatusSend1 As String
Dim SMTP As SMTP
StatusSend1=""
Private Button1 As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("3")
End Sub
Sub EnviarEMail1
SMTP.Initialize("smtp.gmail.com", 587, "ehsanbani@gmail.com", "ehsanban986", "SMTP")
SMTP.UseSSL = True
SMTP.To.Add("rooz987@gmail.com")
SMTP.Subject = "Asunto del Email"
SMTP.Body = "Cuerpo del mensaje."
'SMTP.AddAttachment(File.DirRootExternal, "elarchivoquequeremosadjuntar")
SMTP.Send
End Sub
Sub SMTP_MessageSent(Success As Boolean)
If Success=True Then StatusSend1="SI enviado"
If Success=False Then StatusSend1="NO Enviado"
Log(StatusSend1)
End Sub
Sub Button1_Click
EnviarEMail1
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
سوال
shahan148 28
سلام به همه
چرا با کد زیر ایمیل ارسال نمیشه
#Region Project Attributes #ApplicationLabel: Send Email #VersionCode: 1 #VersionName: 1.0 'SupportedOrientations possible values: unspecified, landscape or portrait. #SupportedOrientations: unspecified #CanInstallToExternalStorage: False #End Region #Region Activity Attributes #FullScreen: False #IncludeTitle: False #End Region Sub Process_Globals 'These global variables will be declared once when the application starts. 'These variables can be accessed from all modules. End Sub Sub Globals 'These variables can only be accessed from this module. Dim StatusSend1 As String Dim SMTP As SMTP StatusSend1="" Private Button1 As Button End Sub Sub Activity_Create(FirstTime As Boolean) Activity.LoadLayout("3") End Sub Sub EnviarEMail1 SMTP.Initialize("smtp.gmail.com", 587, "ehsanbani@gmail.com", "ehsanban986", "SMTP") SMTP.UseSSL = True SMTP.To.Add("rooz987@gmail.com") SMTP.Subject = "Asunto del Email" SMTP.Body = "Cuerpo del mensaje." 'SMTP.AddAttachment(File.DirRootExternal, "elarchivoquequeremosadjuntar") SMTP.Send End Sub Sub SMTP_MessageSent(Success As Boolean) If Success=True Then StatusSend1="SI enviado" If Success=False Then StatusSend1="NO Enviado" Log(StatusSend1) End Sub Sub Button1_Click EnviarEMail1 End Sub Sub Activity_Resume End Sub Sub Activity_Pause (UserClosed As Boolean) End Subلینک ارسال
به اشتراک گذاری در سایت های دیگر
7 پاسخ به این سوال تاکنون داده شده است
ارسالهای توصیه شده
بایگانی شده
این موضوع بایگانی و قفل شده و دیگر امکان ارسال پاسخ نیست.