Advertisement
Guest User

Untitled

a guest
May 6th, 2015
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.46 KB | None | 0 0
  1.  
  2. #Region  Project Attributes
  3.     #ApplicationLabel: Merchant Services
  4.     #VersionCode: 1
  5.     #VersionName:
  6.     'SupportedOrientations possible values: unspecified, landscape or portrait.
  7.     #SupportedOrientations: unspecified
  8.     #CanInstallToExternalStorage: False
  9. #End Region
  10.  
  11.  
  12. #Region  Activity Attributes
  13.     #FullScreen: False
  14.     #IncludeTitle: false
  15. #End Region
  16.  
  17.  
  18. Sub Process_Globals
  19.     'These global variables will be declared once when the application starts.
  20.     'These variables can be accessed from all modules.
  21.     Dim SMTP1 As SMTP
  22.     Dim server As String    : server= "smtp.gmail.com"
  23.     Dim port As Int      : port= 465
  24.     Dim emailname As String   : emailname="mylogin@gmail.com"
  25.     Dim password As String   : password="mypassword"
  26.     Dim protocol As String   : protocol="SMTPClient"
  27. End Sub
  28.  
  29. Sub Globals
  30.     'These global variables will be redeclared each time the activity is created.
  31.     'These variables can only be accessed from this module.
  32.  
  33.     Private cmdRequestPaper As Button
  34. End Sub
  35.  
  36. Sub Activity_Create(FirstTime As Boolean)
  37.    
  38.     Activity.LoadLayout("Home")
  39.       If FirstTime Then
  40.       SMTP1.Initialize(server, port, "themail@gmail.com", password,protocol)
  41.       SMTP1.UseSSL = True
  42.    End If
  43.    
  44. End Sub
  45.  
  46. Sub Activity_Resume
  47.  
  48. End Sub
  49.  
  50. Sub Activity_Pause (UserClosed As Boolean)
  51.  
  52. End Sub
  53.  
  54. Sub cmdRequestPaper_Click
  55.         SMTP1.To.Add (emailname)
  56.     SMTP1.Subject = "Merchant X Requests Paper"
  57.     SMTP1.Body = "Merchant information goes here"
  58.     SMTP1.Send
  59. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement