Hi,
I have a routine that acts as a list server. That is, it will check a pop3 mailbox, download the email and then forward it to all the email addresses in a table. My problem is that I cannot get it to send the attachments. Everything else works fine, just not the attachments. When the email is sending, it looks like it is going and the email that is received in the users box has the "paper clip" symbol indicating there is an attachment, but it is not there.
Here is a shortened snippet of code to do the send:
nrecs = reccount("in_email")
etbl = table.open("in_email")
etbl.fetch_first()
FOR x = 1 TO nrecs
tptr = RTF.create(etbl.Body) ' convert RTF memo field to text
hptr = rtf.create(etbl.Body_html) 'convert RTF memo field to text
aptr = RTF.create(etbl.Attachments) 'convert RFT memo field to text
alist = aptr.Plain_Text 'put attachment list into a variable for processing
if alist <> "" then 'add full path name to attachment(s)
for each foo in alist
attach_list = attach_list + vapp_path + foo.value + crlf()
next
end if
message.from = "[email protected]"
message.subject = etbl.Subject
message.message = tptr.plain_text
message.html_message = hptr.plain_text
message.attachments = etbl.Attachments
message.headers = "Reply-To:" + alltrim(etbl.From_email)
...other code to get email addresses which is assigned to message.to
send_result = email_send2(message,"mailer",.f.,.t.)
for the message.attachments value above, it reads the table directly, I have also tried
message.attachments = alist ' without path name
message.attachments = attach_list ' with full path name
I can't get the attachment(s) to go.
Anyone have any ideas?
thanks,
mike
I have a routine that acts as a list server. That is, it will check a pop3 mailbox, download the email and then forward it to all the email addresses in a table. My problem is that I cannot get it to send the attachments. Everything else works fine, just not the attachments. When the email is sending, it looks like it is going and the email that is received in the users box has the "paper clip" symbol indicating there is an attachment, but it is not there.
Here is a shortened snippet of code to do the send:
nrecs = reccount("in_email")
etbl = table.open("in_email")
etbl.fetch_first()
FOR x = 1 TO nrecs
tptr = RTF.create(etbl.Body) ' convert RTF memo field to text
hptr = rtf.create(etbl.Body_html) 'convert RTF memo field to text
aptr = RTF.create(etbl.Attachments) 'convert RFT memo field to text
alist = aptr.Plain_Text 'put attachment list into a variable for processing
if alist <> "" then 'add full path name to attachment(s)
for each foo in alist
attach_list = attach_list + vapp_path + foo.value + crlf()
next
end if
message.from = "[email protected]"
message.subject = etbl.Subject
message.message = tptr.plain_text
message.html_message = hptr.plain_text
message.attachments = etbl.Attachments
message.headers = "Reply-To:" + alltrim(etbl.From_email)
...other code to get email addresses which is assigned to message.to
send_result = email_send2(message,"mailer",.f.,.t.)
for the message.attachments value above, it reads the table directly, I have also tried
message.attachments = alist ' without path name
message.attachments = attach_list ' with full path name
I can't get the attachment(s) to go.
Anyone have any ideas?
thanks,
mike
Comment