Hello,
I am trying to write the Xbasic code for a dialog AfterValid Event, that will send an html format e-mail to a recipient based on the variables collected.
I used the help file and found an example in the message board. I thought I found the correct syntax!
Any idea what am I doing wrong in writing the following code?
The e-mail gets sent but in the e-mail body, a table shows the following output (not the dialog values):
Location "\beginXbasicCodeBlock ?Loc \endXbasicCodeBlock"
Supplier "\beginXbasicCodeBlock ?Sup \endXbasicCodeBlock
Type "\beginXbasicCodeBlock ?Fut \endXbasicCodeBlock"
Any guidance or help you may provide will be highly appreciated.
Thank you.
I am trying to write the Xbasic code for a dialog AfterValid Event, that will send an html format e-mail to a recipient based on the variables collected.
I used the help file and found an example in the message board. I thought I found the correct syntax!
Any idea what am I doing wrong in writing the following code?
Code:
'DIM the dialog variables DIM var1 as c DIM var2 as c DIM var3 as c 'Assign the variables their values var1 = CurrentForm.Controls.vLoc var2 = CurrentForm.Controls.vSup var3 = CurrentForm.Controls.vType 'DIM the e-mail message DIM pm as P pm.from = "sender e-mail" pm.from_alias = "Alias" pm.to = "receiver e-mail" pm.subject = "subject" pm.html_message = <<%html% <html> <head> </head> <body> <table cellspacing="3" cellpadding="1" width="800" borderColor=black border=1> <tr><td width="90"><p>Location</p></td><td><%a5 ?var1 %></td></tr> <tr><td width="90"><p>Supplier</p></td><td><%a5 ?var2 %></td></tr> <tr><td width="90"><p>Type</p></td><td><%a5 ?var3 %></td></tr> </table> </body> </html> %html% email_send2(pm)
Location "\beginXbasicCodeBlock ?Loc \endXbasicCodeBlock"
Supplier "\beginXbasicCodeBlock ?Sup \endXbasicCodeBlock
Type "\beginXbasicCodeBlock ?Fut \endXbasicCodeBlock"
Any guidance or help you may provide will be highly appreciated.
Thank you.
Comment