NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: rjolda on February 12, 2024, 07:47:37 AM
-
Hi,
Basic question which I am having problems solving. NT14.16, C11.0.136.
SendEMail procedure has:
Prototype: (EmailParametersGroup pEmail),long,proc
Parameters: (EmailParametersGroup pEmail)
THis works correctly ( on same thread):
If SendEmail(parms) = 0
.....
end
However, i want to send E mail on its own thread:
START(SendEmail,35000,parms) gives "No Matching Prototype error"
What am I missing?
Thanks,
Ron
-
Hey Ron,
Are the "params" you mention strings?
Pretty sure START() can only send through parameters as STRIING type.
START(SendEmail,35000,pSubject,pToList,pEmailBody)
That kind of thing. At least, that's in my experience.
-
Hi
From Net Talk Documentation:
Calling the SendEmail Procedure
The SendEmail procedure can be acalled from any other procedure. It might be a button, or a menu item, or it might happen in source code when some event occurs. To call SendEmail follow these steps:
Create a local variable in the procedure;
parms group(EmailParametersGroup).
Where you want to send the email, prime the components of the parms parameter
clear(parms)
parms.pEmailTo = 'bruce@capesoft.com'
parms.pEmailFrom = glo:UserEmail
parms.pEmailSubject = 'Great Release'
parms.pEmailCC = ''
parms.pEmailBCC = ''
parms.pEmailFileList = ''
parms.pEmailEmbedList = ''
parms.pEmailMessageTextST.SetValue('Well done on a great release')
parms.pEmailMessageHTMLST.SetValue('<html>...</html>')
Call the SendEmail procedure. You can do this on another thread;
START(SendEmail,25000,parms) <<<<<<<<=========================
or on the same thread (in which case you get a returned value;
result = SendEmail(parms)
Ron
-
Does sendEmail() have a ,PROC in the prototype ?
I think that might be needed