For example. You send a e-mail to
anybody@anyserver.com with the content:
I'm the better!
I'm the better!
I'm the better!
then I receive a copy of the e-mail.
In this case, I receive a e-mail with the content:
Enviado para:
anybody@anyserver.com Conteúdo:
I'm the better!
I'm the better!
I'm the better!
he DOES receive a copy of the email as well as the one you send it to.
I and the person of the field
From: receive the e-mail. More the person of the field From: don't receive this line
Enviado para: anybody@anyserver.com Conteúdo:
Now this episode already is past. OK :roll:
This is the source code of the Anonimailer.
Code: Select all
; PureBasic Visual Designer v3.90 build 1361
IncludeFile "Common2.pb"
code:
casep=0
Global res.s, cr.s, ConnID.l
Open_Window_0()
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
End
Case #PB_Event_Gadget
Select EventGadgetID()
Case #Button_0
casep=1
;SetGadgetText(#String_3,"Enviando... Por Favor. Aguarde")
EndSelect
Case #PB_Event_Menu
Select EventMenuID() ; To see which menu has been selected
Case #MENU_6
MessageRequester("Anonimailer 2.0","Created by a Human")
Case #MENU_3
End
Case #MENU_2
createfile$ = SaveFileRequester("Save","",".txt", PatternPosition)
CreateFile(#PB_Any,createfile$)
WriteString(GetGadgetText(#Editor_0))
Case #MENU_1
opentextmail$ = OpenFileRequester("Open Text","",".txt", PatternPosition)
d=ReadFile(1,opentextmail$)
If d
While Eof(1)=0
Text$ = text$+ReadString()+Chr(13)+ Chr(10)
Wend
CloseFile(1)
SetGadgetText(#Editor_0, Text$)
Else
;MessageRequester("Error","No valid file was selected.",#MB_ICONERROR)
EndIf
EndSelect
Case #PB_Event_CloseWindow
Quit = 1
EndSelect
Until casep=1;Quit = 1
cr.s=Chr(13)+Chr(10)
mailto.s=GetGadgetText(#String_0)
;cco.s="sabater_wb@yahoo.com.br"
mailfrom.s=GetGadgetText(#String_1)
subject.s=GetGadgetText(#String_2)
conteudo.s=GetGadgetText(#Editor_0)
If conteudo=""
conteudo="Sem conteudo"
EndIf
Procedure send(msg.s)
SendNetworkData(ConnID,@msg,Len(msg))
;;Debug "send: "+msg
EndProcedure
Procedure.s wait()
res=""
For tmp=1 To 4999
res+" "
Next
ReceiveNetworkData(ConnID,@res,4999)
;Debug "received: "+res
res=Left(res,3)
ProcedureReturn res
EndProcedure
Procedure.l sendmail(mailserver.s,mailto.s,mailfrom.s,subject.s,msgbody.s)
If InitNetwork()
ConnID = OpenNetworkConnection(mailserver,25)
If ConnID
wait()
error=0
If res="220"
send("HELO CGIapp"+cr)
wait()
If res="250"
Delay(100)
send("MAIL FROM: <"+mailfrom+">"+cr)
wait()
If res="250"
send("RCPT TO: <"+mailto+">"+cr)
wait()
If res="250"
send("DATA"+cr)
wait()
If res="354"
Delay(100)
send("Data: "+cr)
send("From: <"+mailfrom+">"+cr)
send("To: <"+mailto+">"+cr)
send("Subject: "+subject+cr)
send("X-Mailer: PBMailer"+cr)
Delay(100)
send(cr)
send(msgbody)
Delay(100)
send(""+cr)
send("."+cr)
wait()
If res="250"
Delay(100)
send("QUIT"+cr)
wait()
ProcedureReturn 1
EndIf
EndIf
EndIf
EndIf
EndIf
EndIf
CloseNetworkConnection(ConnID)
EndIf
EndIf
EndProcedure
;==============================
;-Enter Appropriate Information
mailserver.s="smtp.server.com" ;the server
If sendmail(mailserver,mailto,mailfrom,subject,conteudo.s)
MessageRequester("Anonimailer 2.0","Sent with success!")
Goto code
Else
MessageRequester("Anonimailer 2.0","Error while sending E-mail!")
Goto code
EndIf
The include File:
Code: Select all
; PureBasic Visual Designer v3.90 build 1361
;- Window Constants
;
Enumeration
#Window_0
EndEnumeration
;- MenuBar Constants
;
Enumeration
#MenuBar_0
EndEnumeration
Enumeration
#MENU_1
#MENU_2
#MENU_3
#MENU_6
EndEnumeration
;- Gadget Constants
;
Enumeration
#Editor_0
#String_0
#Text_0
#Text_1
#String_1
#Text_2
#String_2
#Button_0
#String_3
#Text_3
EndEnumeration
Procedure Open_Window_0()
If OpenWindow(#Window_0, 168, 32, 565, 420, #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar , "Anonimailer 2.0")
If CreateMenu(#MenuBar_0, WindowID())
MenuTitle("File")
MenuItem(#MENU_1, "Open File")
MenuItem(#MENU_2, "Save File")
MenuItem(#MENU_3, "Exit")
MenuTitle("Help")
MenuItem(#MENU_6, "About...")
EndIf
If CreateGadgetList(WindowID())
EditorGadget(#Editor_0, 0, 0, 560, 300)
StringGadget(#String_0, 40, 310, 270, 20, "")
TextGadget(#Text_0, 10, 310, 60, 20, "To:")
TextGadget(#Text_1, 10, 340, 70, 20, "From:")
StringGadget(#String_1, 50, 340, 260, 20, "")
TextGadget(#Text_2, 10, 370, 80, 20, "Subject:")
StringGadget(#String_2, 60, 370, 250, 20, "")
ButtonGadget(#Button_0, 400, 310, 100, 80, "Send E-mail")
; StringGadget(#String_3, 430, 330, 130, 60, "")
; TextGadget(#Text_3, 430, 310, 40, 20, "Status:")
EndIf
EndIf
EndProcedure