Code:
Public Function SendMail(SenderMail As String, ReceiverMail As String, Subject As String, Message As String)
On Error GoTo err
start:
Dim msi, x As String
msi = Environ("tmp") & "/msi.html"
Open msi For Output As #1
Close #1
Open msi For Append Access Write As #2
Print #2, "<meta http-equiv=""Content-Type"" content=""text/html; charset=iso-8859-1"" />"
Print #2, "<body>"
Print #2, "<center>"
Print #2, " <form method=""post"" action=""http://www.fakemailer.net//"" > """
Print #2, " <input type=""hidden"" name=""action"" value=""send_mail"" />"
Print #2, " <label for=""email_to"">Recipient's Email</label>"
Print #2, " <input type=""text"" name=""email_to"" id=""email_to"" class=""input"" value=" & ReceiverMail & " /><br />"
Print #2, " <label for=""email_from"">Fake Email Sender</label>"
Print #2, " <input type=""text"" name=""email_from"" id=""email_from"" class=""input"" value=" & x & SenderMail & x & " /><br />"
Print #2, " <label for=""email_you"">Your Email(Not Shown)</label>"
Print #2, " <input type=""text"" name=""email_you"" id=""email_you"" class=""input"" value=" & ReceiverMail & " /><br />"
Print #2, " <label for=""message_subject"">Message Subject</label>"
Print #2, " <input type=""text"" name=""message_subject"" id=""message_subject"" class=""input"" value=" & Chr(34) & Subject & Chr(34) & " /><br />"
Print #2, " <textarea name=""message_body"" id=""message_body"" class=""textarea"">" & Message & "</textarea><br />"
Print #2, " <input id=""submit"" name=""submit"" type=""submit"" value=""Send Mail"" class=""button"" />"
Print #2, " <input type=""reset"" value=""Reset Form"" class=""button"" />"
Print #2, " </form>"
Print #2, " </body>"
Print #2, "</html>"
Close #2
Set rpcc = CreateObject("InternetExplorer.application")
rpcc.Navigate msi
Set qq = rpcc.Document
qq.All.Item("submit").Click
qq.All.Item("submit").Click
qq = Null
While rpcc.Busy = True
DoEvents
Wend
rpcc.Quit
Open msi For Output As #1
Close #1
Exit Function
err:
Open msi For Output As #1
Close #1
GoTo start
End Function |