here's my code.
mailSession mSes
mailReturnCode mRet
mailMessage mMsg
mailFileDescription mAttach
// Create a mail session
mSes = create mailSession
// Log on to the session
mRet = mSes.mailLogon(mailNewSession!)
IF mRet = mailReturnSuccess! THEN
// Populate the mailMessage structure
mMsg.Subject = "Mobile Order"
mMsg.NoteText = "New Sales Order " + String(gl_current_order)
mMsg.Recipient[1].name = ProfileString(gs_ini_filename,"Defaults",
"Email To Address", "")
mAttach.Filename = is_filename
mAttach.Pathname = ""
mAttach.FileType = mailAttach!
mAttach.Position = len(mMsg.NoteText) + 1
mMsg.AttachmentFile[ 1 ] = mAttach
// Send the mail
mSes.mailSend(mMsg)
I sure would appreciate it if someone could spot the problem.
Mike
The filename was not properly set. And the pointer is not needed.