Page 1 of 1

Urgent need to have a strong technical person to answer it

Posted: Thu Oct 13, 2016 2:18 pm
by callroot
How to use IP proxy to send mail???????

Code: Select all

; process to test new email capabilities in PB 5.40


;****************************************************************************************
; send out the page to the secure server
;****************************************************************************************

Procedure SendPage()

Protected result.i
Protected logText.s
Protected mailNumber.i
Protected emailType.s = "text/plain"
Protected mailHost.s = "smtp.mail.me.com"
Protected userName.s = "xxxxxx@icloud.com"
Protected mailFrom.s = "xxxxxxxxxxg@icloud.com"
Protected mailPort.i = 587
Protected mailTo.s = "2364567316@qq.com"
Protected subject.s = "64 bit email Test using TLS Encryption"
Protected emailBody.s = "Dear Sir, this email is brought to you courtesy of 64 bit TLS Encryption."

password.s = "123456789"

; PrintN("Enter the password for " + userName)
; Protected password.s = Input()

PrintN("SendPage() > About to create mail!")

mailNumber =CreateMail(#PB_Any, userName, subject)
If mailNumber > 0
AddMailRecipient(mailNumber, mailTo, #PB_Mail_To)
SetMailBody(mailNumber, emailBody)
result = AddMailAttachmentData(mailNumber, "attachment", @emailBody, Len(emailBody), emailBody)
PrintN("SendPage() > AddMailAttachmentData return value: " + Str(result))
result = SendMail(mailNumber, mailHost, mailPort, #PB_Mail_UseSSL, userName, password)
PrintN("SendPage() > SendMail return value: " + Str(result))
FreeMail(mailNumber)
Else
PrintN("SendPage() > error creating mail process")
EndIf

EndProcedure

; open the console window, initialize the network, send the message, then quit

InitNetwork()

OpenConsole()

SendPage()

Input()

CloseConsole()
; IDE Options = PureBasic 5.42 LTS (Windows - x86)
; CursorPosition = 34
; FirstLine = 4
; Folding = -
; EnableXP
How to use IP proxy to send mail???????

Re: Urgent need to have a strong technical person to answer

Posted: Fri Oct 14, 2016 1:07 am
by callroot
Is there a way of thinking, how to achieve sock5 can do?

Re: Urgent need to have a strong technical person to answer

Posted: Fri Oct 14, 2016 7:53 am
by Kukulkan
To my knowledge, a SMTP proxy is more close to an MTA and so called an e-mail gateway. In my experience, they work similar to a normal MTA and therefore accept the e-mails on port 25 (SMTP) and forward everything (if source IP is allowed and filtering is good etc.). Thus, setting the mail-host to the IP of the e-mail gateway should do the trick.

But maybe you are talking about some other sort of proxy with other protocols? In this case, I can not help as I've never seen such a setup.