273 lines
7.8 KiB
Plaintext
273 lines
7.8 KiB
Plaintext
*--------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!!
|
|
*--------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
*< FOXBIN2PRG: Version="1.21" SourceFile="frm_trimit_mail.scx" CPID="1252" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries)
|
|
*
|
|
*
|
|
DEFINE CLASS dataenvironment AS dataenvironment
|
|
*< CLASSDATA: Baseclass="dataenvironment" Timestamp="" Scale="" Uniqueid="" ClassIcon="1" />
|
|
|
|
*<PropValue>
|
|
DataSource = .NULL.
|
|
Height = 0
|
|
Left = 0
|
|
Name = "Dataenvironment"
|
|
Top = 0
|
|
Width = 0
|
|
*</PropValue>
|
|
|
|
ENDDEFINE
|
|
|
|
DEFINE CLASS frm_trimit_mail AS frm_termin_renunt OF "..\clase\_frm_child.vcx"
|
|
*< CLASSDATA: Baseclass="form" Timestamp="" Scale="" Uniqueid="" />
|
|
|
|
*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder
|
|
*< OBJECTDATA: ObjPath="Label1" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="Label2" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="Text2" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="Label3" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="Label4" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="Label5" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="Text3" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="Text4" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="Text5" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="Label6" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="Label7" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="Label8" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="But_salveaza1" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="But_salveaza2" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="Text7" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="Text8" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="cboExpeditori" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="cboDestinatari" UniqueID="" Timestamp="" />
|
|
|
|
*<PropValue>
|
|
DataSession = 1
|
|
DoCreate = .T.
|
|
Height = 500
|
|
Name = "frm_trimit_mail"
|
|
Width = 400
|
|
_shape1.Height = 29
|
|
_shape1.Left = 36
|
|
_shape1.Name = "_shape1"
|
|
_shape1.Top = 0
|
|
_shape1.Width = 396
|
|
_shape2.Left = 324
|
|
_shape2.Name = "_shape2"
|
|
_shape2.Top = 0
|
|
Lb_titlu_alb_b121.Caption = "TRIMITERE MAIL"
|
|
Lb_titlu_alb_b121.Left = 60
|
|
Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
|
|
Lb_titlu_alb_b121.Top = 0
|
|
BUT_TERMIN1.Left = 366
|
|
BUT_TERMIN1.Name = "BUT_TERMIN1"
|
|
BUT_TERMIN1.Top = 1
|
|
Gridsort1.Name = "Gridsort1"
|
|
BUT_RENUNT1.Left = 337
|
|
BUT_RENUNT1.Name = "BUT_RENUNT1"
|
|
BUT_RENUNT1.Top = 1
|
|
*</PropValue>
|
|
|
|
ADD OBJECT 'But_salveaza1' AS but_salveaza WITH ;
|
|
Caption = "Salveaza user", ;
|
|
Height = 48, ;
|
|
Left = 156, ;
|
|
Name = "But_salveaza1", ;
|
|
Top = 216, ;
|
|
Width = 156
|
|
*< END OBJECT: ClassLib="..\clase\cmd_butoane.vcx" BaseClass="commandbutton" />
|
|
|
|
ADD OBJECT 'But_salveaza2' AS but_salveaza WITH ;
|
|
Caption = "Salveaza destinatar", ;
|
|
Height = 51, ;
|
|
Left = 156, ;
|
|
Name = "But_salveaza2", ;
|
|
Top = 420, ;
|
|
Width = 156
|
|
*< END OBJECT: ClassLib="..\clase\cmd_butoane.vcx" BaseClass="commandbutton" />
|
|
|
|
ADD OBJECT 'cboDestinatari' AS combobox WITH ;
|
|
BoundColumn = 2, ;
|
|
BoundTo = .T., ;
|
|
Height = 25, ;
|
|
Left = 132, ;
|
|
Name = "cboDestinatari", ;
|
|
Top = 288, ;
|
|
Width = 253
|
|
*< END OBJECT: BaseClass="combobox" />
|
|
|
|
ADD OBJECT 'cboExpeditori' AS combobox WITH ;
|
|
BoundColumn = 2, ;
|
|
BoundTo = .T., ;
|
|
Height = 25, ;
|
|
Left = 132, ;
|
|
Name = "cboExpeditori", ;
|
|
Top = 36, ;
|
|
Width = 253
|
|
*< END OBJECT: BaseClass="combobox" />
|
|
|
|
ADD OBJECT 'Label1' AS label WITH ;
|
|
Caption = "Expeditor :", ;
|
|
Height = 24, ;
|
|
Left = 48, ;
|
|
Name = "Label1", ;
|
|
Top = 36, ;
|
|
Width = 72
|
|
*< END OBJECT: BaseClass="label" />
|
|
|
|
ADD OBJECT 'Label2' AS label WITH ;
|
|
Caption = "Server :", ;
|
|
Height = 25, ;
|
|
Left = 48, ;
|
|
Name = "Label2", ;
|
|
Top = 72, ;
|
|
Width = 73
|
|
*< END OBJECT: BaseClass="label" />
|
|
|
|
ADD OBJECT 'Label3' AS label WITH ;
|
|
Caption = "User :", ;
|
|
Height = 25, ;
|
|
Left = 48, ;
|
|
Name = "Label3", ;
|
|
Top = 108, ;
|
|
Width = 73
|
|
*< END OBJECT: BaseClass="label" />
|
|
|
|
ADD OBJECT 'Label4' AS label WITH ;
|
|
Caption = "Pass : ", ;
|
|
Height = 25, ;
|
|
Left = 48, ;
|
|
Name = "Label4", ;
|
|
Top = 144, ;
|
|
Width = 73
|
|
*< END OBJECT: BaseClass="label" />
|
|
|
|
ADD OBJECT 'Label5' AS label WITH ;
|
|
Caption = "Port :", ;
|
|
Height = 25, ;
|
|
Left = 48, ;
|
|
Name = "Label5", ;
|
|
Top = 180, ;
|
|
Width = 73
|
|
*< END OBJECT: BaseClass="label" />
|
|
|
|
ADD OBJECT 'Label6' AS label WITH ;
|
|
Caption = "Destinatar :", ;
|
|
Height = 25, ;
|
|
Left = 48, ;
|
|
Name = "Label6", ;
|
|
Top = 288, ;
|
|
Width = 73
|
|
*< END OBJECT: BaseClass="label" />
|
|
|
|
ADD OBJECT 'Label7' AS label WITH ;
|
|
Caption = "Subiect :", ;
|
|
Height = 25, ;
|
|
Left = 48, ;
|
|
Name = "Label7", ;
|
|
Top = 324, ;
|
|
Width = 73
|
|
*< END OBJECT: BaseClass="label" />
|
|
|
|
ADD OBJECT 'Label8' AS label WITH ;
|
|
Caption = "Body :", ;
|
|
Height = 25, ;
|
|
Left = 48, ;
|
|
Name = "Label8", ;
|
|
Top = 360, ;
|
|
Width = 73
|
|
*< END OBJECT: BaseClass="label" />
|
|
|
|
ADD OBJECT 'Text2' AS textbox WITH ;
|
|
Height = 25, ;
|
|
Left = 132, ;
|
|
Name = "Text2", ;
|
|
Top = 72, ;
|
|
Width = 252
|
|
*< END OBJECT: BaseClass="textbox" />
|
|
|
|
ADD OBJECT 'Text3' AS textbox WITH ;
|
|
Height = 25, ;
|
|
Left = 132, ;
|
|
Name = "Text3", ;
|
|
Top = 108, ;
|
|
Width = 253
|
|
*< END OBJECT: BaseClass="textbox" />
|
|
|
|
ADD OBJECT 'Text4' AS textbox WITH ;
|
|
Height = 25, ;
|
|
Left = 132, ;
|
|
Name = "Text4", ;
|
|
Top = 144, ;
|
|
Width = 253
|
|
*< END OBJECT: BaseClass="textbox" />
|
|
|
|
ADD OBJECT 'Text5' AS textbox WITH ;
|
|
Alignment = 0, ;
|
|
Height = 25, ;
|
|
Left = 132, ;
|
|
Name = "Text5", ;
|
|
Top = 180, ;
|
|
Value = 25, ;
|
|
Width = 253
|
|
*< END OBJECT: BaseClass="textbox" />
|
|
|
|
ADD OBJECT 'Text7' AS textbox WITH ;
|
|
Height = 25, ;
|
|
Left = 132, ;
|
|
Name = "Text7", ;
|
|
Top = 324, ;
|
|
Width = 253
|
|
*< END OBJECT: BaseClass="textbox" />
|
|
|
|
ADD OBJECT 'Text8' AS textbox WITH ;
|
|
Height = 25, ;
|
|
Left = 132, ;
|
|
Name = "Text8", ;
|
|
Top = 360, ;
|
|
Width = 253
|
|
*< END OBJECT: BaseClass="textbox" />
|
|
|
|
PROCEDURE But_salveaza1.Click
|
|
*INSERT INTO nomexpeditori(adresa_expeditori,server_mail,user,pass) VALUES (
|
|
ENDPROC
|
|
|
|
PROCEDURE But_salveaza2.Click
|
|
*INSERT INTO
|
|
ENDPROC
|
|
|
|
PROCEDURE BUT_TERMIN1.Click
|
|
#DEFINE PRIORITYHIGH 1
|
|
#DEFINE PRIORITYLOW 0
|
|
|
|
DIMENSION aryAttach(1)
|
|
*aryAttach(1)
|
|
*----------------------------------
|
|
LOCAL lcFrom, lcTo, lcSubject, lcBody, lcCC, lcBCC, lcMailServer, lcUserName, lcPassword, lnPort, lnPriority, llHTMLFormat, lcErrReturn
|
|
&&do form trimit_mail
|
|
lcFrom =ALLTRIM(thisform.text1.Value) && expeditor
|
|
lcTo = ALLTRIM(thisform.text6.Value) && catre
|
|
|
|
lcSubject = ALLTRIM(thisform.text7.Value)
|
|
*!* Sending the body in HTML format
|
|
llHTMLFormat = .F. && change to .F. to send plain text message
|
|
lcBody = ALLTRIM(thisform.text8.Value )
|
|
*!* lcCC = "lianamacinic@gmail.com"
|
|
*!* lcBCC = "lianamacinic@gmail.com"
|
|
lcMailServer = ALLTRIM(thisform.text2.Value )
|
|
lnPort = thisform.text3.value
|
|
lcUserName = ALLTRIM(thisform.text4.Value)
|
|
lcPassword = ALLTRIM(TRANSFORM(thisform.text5.Value ))
|
|
lnPriority = PRIORITYHIGH
|
|
|
|
SendViaBLAT(@lcErrReturn,lcSubject, lcBody, @aryAttach)
|
|
|
|
IF EMPTY(lcErrReturn)
|
|
MESSAGEBOX("'" + lcSubject + "' sent successfullly.", 64, "Send email via BLAT")
|
|
ELSE
|
|
MESSAGEBOX("'" + lcSubject + "' failed to be sent. Reason:" + CHR(13) + lcErrReturn, 64, "Send email via BLAT")
|
|
ENDIF
|
|
ENDPROC
|
|
|
|
ENDDEFINE
|