What I have right now is this.... but i get a message saying that the message was not sent.
Sub send_Click
Dim Obj1, Obj2 As Reflector
Dim bmp As Bitmap
Dim c As Canvas
Obj1.Target = Obj1.GetActivityBA
Obj1.Target = Obj1.GetField("vg")
bmp.InitializeMutable(Activity.Width, Activity.Height)
c.Initialize2(bmp)
Dim args(1) As Object
Dim types(1) As String
Obj2.Target = c
Obj2.Target = Obj2.GetField("canvas")
args(0) = Obj2.Target
types(0) = "android.graphics.Canvas"
Obj1.RunMethod4("draw", args, types)
Dim Out As OutputStream
Out = File.OpenOutput(File.DirRootExternal, "Someimage.png", False)
bmp.WriteToStream(Out, 100, "PNG")
Out.Close
SMTP.Initialize("1.serever.com", 110, "
myemail@email.com", "xxxxxx", "SMTP")
SMTP.StartTLSMode = True
SMTP.To.Add("
myemail@email.com")
SMTP.Subject = "This is the subject"
SMTP.Body = "This is the message body."
SMTP.AddAttachment(File.DirRootExternal, "Someimage.png")
SMTP.Send
End Sub
Sub SMTP_MessageSent(Success As Boolean)
Log(Success)
If Success Then
ToastMessageShow("Message sent successfully", True)
Else
ToastMessageShow("Error sending message", True)
Log(LastException.Message)
End If
End Sub