Specified argument type differs from required argument type at runtime in DLL function sendsmtpmail.
(invalid stack pointer on return from function call) at line 35 in function of_send_email of object nvo_pdf_printer.
---------------------------
SendMail function works great!

I think the problem is that I'm not declaring the function incorrectly in my local external declaration. Here is how I am declaring it in my PB9 app:
Function long SendSmtpMail(String szHostname, long lPort, String szFrom, String Toadd, String CCadd, String BCCadd, String Subject, String as_Message, String FileNames, Long Options) library "cdintf210.dll"
Here is how I am calling it:
ll_rc = SendSmtpMail ( ls_SmtpHostName, long(ls_SmtpPort), astr_emailattribute.s_from, astr_emailattribute.s_to, astr_emailattribute.s_cc, astr_emailattribute.s_bcc, astr_emailattribute.s_subject, astr_emailattribute.s_message, astr_emailattribute.s_document_path+';'+astr_emailattribute.s_document_name, 0 )
I have gone through to make sure each argument is correct however I'm questioning the declaration and therefore the documentation the version that I have. I'm running 2.10