<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.us.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>25 Aug 2016 08:44:41 Z</lastBuildDate><pubDate>24 Aug 2016 17:26:20 Z</pubDate><description>Hi,&#13;
&#13;
I use the EmailSendMessage instruction for quite a time with no problem.&#13;
I use also Email.NbAttach + Email.Attach for my Attach file(s).&#13;
&#13;
When i debug the project within Windev20 my application is working fine , its created correct emails with attach files !&#13;
&#13;
After creating the executable the application is creating the emails but without attachment files ?????&#13;
I had no errors .&#13;
&#13;
What could be wrong ?&#13;
&#13;
Hope someone can help me quick cause i have a production isuue to sove.&#13;
&#13;
Thanks,&#13;
&#13;
Eric[code:wl]&#13;
PROCEDURE Email_Klant_Copy_Werkbon(p_datum_planning, p_technieker, p_bestand, p_taal_klant, l_error)&#13;
// Versturen van copy werkbon naar de klant&#13;
// ========================================&#13;
sHTMLFile 	is string //name of the file and access path of the HTML file&#13;
sDir 		is string //name of dir of HTML file&#13;
SWITCH p_taal_klant&#13;
	CASE "NL"&#13;
		sHTMLFile = g_path_WB_DOC + "werkbon_email_klant.htm"	&#13;
	CASE "FR"&#13;
		sHTMLFile = g_path_WB_DOC + "werkbon_email_klant_FR.htm"&#13;
	OTHER CASE&#13;
		sHTMLFile = g_path_WB_DOC + "werkbon_email_klant.htm"&#13;
END&#13;
&#13;
//Start a SMTP session&#13;
EmailSetTimeOut(g_EmailSetTimeOut) // Time_out&#13;
IF EmailStartSMTPSession( g_Email_Sender, g_PasswordUserSMTP , g_SessionSMTP, g_PortSMTP, False ,emailOptionSecuredTLS) = True THEN&#13;
	// initialization&#13;
	EmailReset()&#13;
	// retrieves the directory of the HTML file&#13;
	sDir = fExtractPath(sHTMLFile,fDirectory)&#13;
	// fill the email structure&#13;
	EmailImportHTML(fLoadText(sHTMLFile),sDir)	&#13;
	// Customization&#13;
	// replace the HTML variables&#13;
//	Email.HTML = Replace(Email.HTML,"[%Technieker%]",p_technieker)&#13;
//	Email.HTML = Replace(Email.HTML,"[%Datum%]",DateToString(p_datum_planning))	&#13;
	SWITCH p_taal_klant&#13;
		CASE "NL"&#13;
			Email.HTML = Replace(Email.HTML,"[%Technieker%]",p_technieker)&#13;
			Email.HTML = Replace(Email.HTML,"[%Datum%]",DateToString(p_datum_planning))		&#13;
		CASE "FR"&#13;
			Email.HTML = Replace(Email.HTML,"[%Technicien%]",p_technieker)&#13;
			Email.HTML = Replace(Email.HTML,"[%Date%]",DateToString(p_datum_planning))	&#13;
		OTHER CASE&#13;
			Email.HTML = Replace(Email.HTML,"[%Technieker%]",p_technieker)&#13;
			Email.HTML = Replace(Email.HTML,"[%Datum%]",DateToString(p_datum_planning))	&#13;
	END&#13;
	//Sender of the message&#13;
	Email.Sender = g_Email_Sender	&#13;
	//Recipients of the message&#13;
	Email.Recipient[1] = g_Email_Recip_Klant&#13;
	Email.NbRecipient = 1&#13;
	&#13;
	Email.Bcc[1] = g_Email_Sender&#13;
	Email.NbBcc = 1&#13;
	&#13;
	IF g_Email_Recip_Forward &lt;&gt; "" THEN&#13;
		Email.Bcc[2] = g_Email_Recip_Forward&#13;
		Email.NbBcc = 2	&#13;
	END&#13;
	//Attachments&#13;
	Email.NbAttach = 1&#13;
	Email.Attach = g_Path_server + p_bestand	&#13;
	//Subject and content of message&#13;
	//Email.Subject = g_Omgeving+"/(Klant) Copy " + Middle(p_bestand,Position(p_bestand ,"\",1)+1)&#13;
	SWITCH p_taal_klant&#13;
		CASE "NL"&#13;
			Email.Subject = g_Omgeving+"/(Klant) Kopie " + Middle(p_bestand,Position(p_bestand ,"\",1)+1)&#13;
		CASE "FR"&#13;
			Email.Subject = g_Omgeving+"/(Client) Copie " + Middle(p_bestand,Position(p_bestand ,"\",1)+1)&#13;
		OTHER CASE&#13;
			Email.Subject = g_Omgeving+"/(Klant) Kopie " + Middle(p_bestand,Position(p_bestand ,"\",1)+1)&#13;
	END&#13;
&#13;
	IF EmailSendMessage(g_Email_Sender) = False THEN&#13;
		Error()&#13;
	 	l_error = 1&#13;
	ELSE&#13;
	 	// recupereren email_bestand&#13;
	 	// =========================&#13;
		IF EmailBuildSource() = True THEN&#13;
			// opzoeken folder emails in klant folder&#13;
			savefolder is string = ""&#13;
			savefoldertext is string&#13;
			HReadSeekFirst(TYPEDOC,Type_doc,"COMMXX")&#13;
			IF HFound(TYPEDOC) = True THEN &#13;
				IF TYPEDOC.Map_doc &lt;&gt; "" THEN			&#13;
					savefolder = g_Path_PDF + TYPEDOC.Map_doc + "\"&#13;
				ELSE&#13;
					savefolder = g_Path_PDF&#13;
				END				&#13;
				// check of map dient aangemaakt te worden ?&#13;
				// =========================================&#13;
				FileID is int = fMakeDir(savefolder)&#13;
				IF FileID = -1 THEN&#13;
					Error(ErrorInfo())&#13;
					l_error = 1 &#13;
					// schrijf in LOG bestand ?&#13;
					&#13;
					//&#13;
					GOTO END_BUTTON&#13;
				END&#13;
				savefoldertext = savefolder + Replace(ExtractString(p_bestand,1,"\",FromEnd),".PDF",".eml")&#13;
				fSaveText(savefoldertext,Email.Source)&#13;
			ELSE&#13;
				savefolder = g_Path_PDF&#13;
				// check of map dient aangemaakt te worden ?&#13;
				// =========================================&#13;
				FileID is int = fMakeDir(savefolder)&#13;
				IF FileID = -1 THEN&#13;
					Error(ErrorInfo())&#13;
					l_error = 1 &#13;
					// schrijf in LOG bestand ?&#13;
					&#13;
					//&#13;
					GOTO END_BUTTON&#13;
				END&#13;
				savefoldertext = savefolder + Replace(ExtractString(p_bestand,1,"\",FromEnd),".PDF",".eml")&#13;
				fSaveText(savefoldertext,Email.Source)&#13;
			END&#13;
		ELSE&#13;
			l_error = 1&#13;
		END&#13;
	END&#13;
	END_BUTTON:&#13;
	EmailCloseSession(g_Email_Sender)&#13;
&#13;
ELSE&#13;
	Error("Unable to establish connection", ErrorInfo(), ...&#13;
	"In case of time-out, check the parameters of the "+ ...&#13;
	"""Firewall"" on the port used (587)")&#13;
	l_error = 1&#13;
END&#13;
[/code]</description><ttl>30</ttl><generator>WEBDEV</generator><language>en_US</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59218-email-nbattach-email-attach-specified-but-appearance-email/read.awp</link><title>Email.NbAttach + Email.Attach specified but no appearance in email ?</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster><item><author>software</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59218-email-nbattach-email-attach-specified-but-appearance-email-59232/read.awp</comments><pubDate>25 Aug 2016 08:44:41 Z</pubDate><description>Corrections on the above code : (code was bad copied), sorry&#13;
&#13;
SWITCH p_taal_klant&#13;
		CASE "NL"&#13;
			Email.HTML = Replace(Email.…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59218-email-nbattach-email-attach-specified-but-appearance-email-59232/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59218-email-nbattach-email-attach-specified-but-appearance-email-59232/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59218-email-nbattach-email-attach-specified-but-appearance-email/read.awp">Email.NbAttach + Email.Attach specified but no appearance in email ?</source><title>Re: Email.NbAttach + Email.Attach specified but no appearance in email ?</title></item></channel></rss>
