fvdpbaan
14th February 2007, 09:25
Hello Baanboard users,

is it possible to pass on a baan variable to a shell() function? How do I do this?

Example: I want to pass on a <e-mail_adress_variable>.

function send.mailing.file()
{
long ret

ret = shell("mailx -s 'De status van uw order is gewijzigd.' <e-mail_adress_variable> < /var/samba/aut/order.txt", 0)
}

Best regards,

Frank

JaapJD
14th February 2007, 09:31
There are a lot of possibilities, e.g. string concatenation and sprintf$ function:


ret = shell("mailx -s 'Status has been changed.' " & email_adres & " < /var...", 0)
ret = shell(sprintf$("mailx -s 'Status has been changed.' %s < /var...", email_adres), 0)

fvdpbaan
14th February 2007, 10:49
Hello Jaap,

Thx for the solution. It works.

Best regards,

Frank