Quantcast

LC9 DP5 - mimeEncodeAsMIMEEmail and attachments

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

LC9 DP5 - mimeEncodeAsMIMEEmail and attachments

Mark Talluto via use-livecode
Hi,
did someone already tested the new mime library, especially the command mimeEncodeAsMIMEEmail.

I tried it already and i am having problems to use the command with an attachment. My problem is, the attachment is not encoded and not added to the encoded message in the IT variable.

This is my sample code i am using for it

on mouseUp
   answer File "file"
   if it is empty then exit to top
   put it into tFile
   put URL ("Binfile:"&tFile) into tData
   set the itemdelimiter to slash
   put item -1 of tFile into tFileName
   put tFile into tAttachment["filepath"]
   put "tFileName" into tAttachment["name"]
   put tData into tAttachment["data"]
   
   put "[hidden email] <mailto:[hidden email]>" into tTo
   put "[hidden email] <mailto:[hidden email]>" into tCc
   put "[hidden email] <mailto:[hidden email]>" into tFrom
   put "this is the subject" into tSubject
   put mimeEncodeFieldAsMIMEMultipartDocument(the long id of field 1) into tBody
   
   
   mimeEncodeAsMIMEEmail tBody, tFrom, tTo, tCC, tSubject, tAttachment
   
   put it
   answer the result
end mouseUp

Shouldn´t that work? Or is there an error in it? The Result does not show any error.


Regards,

Matthias
Matthias Rebbe
Bramkampsieke 13
32312 Lübbecke
Tel +49 5741 310000
    +49 160 5504462
Fax: +49 5741 310002
eMail: [hidden email] <mailto:[hidden email]>

BR5 Konverter - BR5 -> MP3 <http://matthiasrebbe.eu/portfolio/produkte/brx/>

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: LC9 DP5 - mimeEncodeAsMIMEEmail and attachments

Mark Talluto via use-livecode
Exclude the mailto: in each email address.

Bob S


> On Feb 24, 2017, at 07:54 , Matthias Rebbe via use-livecode <[hidden email]> wrote:
>
> Hi,
> did someone already tested the new mime library, especially the command mimeEncodeAsMIMEEmail.
>
> I tried it already and i am having problems to use the command with an attachment. My problem is, the attachment is not encoded and not added to the encoded message in the IT variable.
>
> This is my sample code i am using for it
>
> on mouseUp
>   answer File "file"
>   if it is empty then exit to top
>   put it into tFile
>   put URL ("Binfile:"&tFile) into tData
>   set the itemdelimiter to slash
>   put item -1 of tFile into tFileName
>   put tFile into tAttachment["filepath"]
>   put "tFileName" into tAttachment["name"]
>   put tData into tAttachment["data"]
>
>   put "[hidden email] <mailto:[hidden email]>" into tTo
>   put "[hidden email] <mailto:[hidden email]>" into tCc
>   put "[hidden email] <mailto:[hidden email]>" into tFrom
>   put "this is the subject" into tSubject
>   put mimeEncodeFieldAsMIMEMultipartDocument(the long id of field 1) into tBody
>
>
>   mimeEncodeAsMIMEEmail tBody, tFrom, tTo, tCC, tSubject, tAttachment
>
>   put it
>   answer the result
> end mouseUp
>
> Shouldn´t that work? Or is there an error in it? The Result does not show any error.
>
>
> Regards,
>
> Matthias
> Matthias Rebbe
> Bramkampsieke 13
> 32312 Lübbecke
> Tel +49 5741 310000
>     +49 160 5504462
> Fax: +49 5741 310002
> eMail: [hidden email] <mailto:[hidden email]>
>
> BR5 Konverter - BR5 -> MP3 <http://matthiasrebbe.eu/portfolio/produkte/brx/>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: LC9 DP5 - mimeEncodeAsMIMEEmail and attachments

Mark Talluto via use-livecode
In reply to this post by Mark Talluto via use-livecode
Outside the angle brackes is the display name of the email. Inside is the actual email address. Unless the mailbox really is called "mailto:email1", the server will reject this as an invalid email address. In fact I do not believe colons are legal characters in a mailbox.

Bob S


> On Feb 24, 2017, at 07:54 , Matthias Rebbe via use-livecode <[hidden email]> wrote:
>
>   put "[hidden email] <mailto:[hidden email]>" into tTo


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: LC9 DP5 - mimeEncodeAsMIMEEmail and attachments

Mark Talluto via use-livecode
In reply to this post by Mark Talluto via use-livecode
Thanks, but the script does not include that. It seems Apple Mail.app  added that to the script.

But my original script definitely just contains the email address.


> Am 24.02.2017 um 17:05 schrieb Bob Sneidar via use-livecode <[hidden email] <mailto:[hidden email]>>:
>
> Exclude the mailto: in each email address.
>
> Bob S
>
>
>> On Feb 24, 2017, at 07:54 , Matthias Rebbe via use-livecode <[hidden email] <mailto:[hidden email]>> wrote:
>>
>> Hi,
>> did someone already tested the new mime library, especially the command mimeEncodeAsMIMEEmail.
>>
>> I tried it already and i am having problems to use the command with an attachment. My problem is, the attachment is not encoded and not added to the encoded message in the IT variable.
>>
>> This is my sample code i am using for it
>>
>> on mouseUp
>>  answer File "file"
>>  if it is empty then exit to top
>>  put it into tFile
>>  put URL ("Binfile:"&tFile) into tData
>>  set the itemdelimiter to slash
>>  put item -1 of tFile into tFileName
>>  put tFile into tAttachment["filepath"]
>>  put "tFileName" into tAttachment["name"]
>>  put tData into tAttachment["data"]
>>
>>  put "[hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>>" into tTo
>>  put "[hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>>" into tCc
>>  put "[hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>>" into tFrom
>>  put "this is the subject" into tSubject
>>  put mimeEncodeFieldAsMIMEMultipartDocument(the long id of field 1) into tBody
>>
>>
>>  mimeEncodeAsMIMEEmail tBody, tFrom, tTo, tCC, tSubject, tAttachment
>>
>>  put it
>>  answer the result
>> end mouseUp
>>
>> Shouldn´t that work? Or is there an error in it? The Result does not show any error.
>>
>>
>> Regards,
>>
>> Matthias
>> Matthias Rebbe
>> Bramkampsieke 13
>> 32312 Lübbecke
>> Tel +49 5741 310000
>>   +49 160 5504462
>> Fax: +49 5741 310002
>> eMail: [hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>>
>>
>> BR5 Konverter - BR5 -> MP3 <http://matthiasrebbe.eu/portfolio/produkte/brx/ <http://matthiasrebbe.eu/portfolio/produkte/brx/>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email] <mailto:[hidden email]>
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
> _______________________________________________
> use-livecode mailing list
> [hidden email] <mailto:[hidden email]>
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: LC9 DP5 - mimeEncodeAsMIMEEmail and attachments

Mark Talluto via use-livecode
Hi,

just found out what the problem was. I examined the mime.livecodescript file.

The array which holds the attachment information has to be a multidimensional array

e.g. pAttachment[1][name] for the first attachment
       pAttachment[2][name] for the second attachment

and so on.


Of course that make sense, but a note in the dictionary would have saved me some time.

But anyway it´s working now. ;)

Matthias



Matthias Rebbe
Bramkampsieke 13
32312 Lübbecke
Tel +49 5741 310000
    +49 160 5504462
Fax: +49 5741 310002
eMail: [hidden email] <mailto:[hidden email]>

BR5 Konverter - BR5 -> MP3 <http://matthiasrebbe.eu/portfolio/produkte/brx/>

> Am 24.02.2017 um 17:08 schrieb Matthias Rebbe via use-livecode <[hidden email] <mailto:[hidden email]>>:
>
> Thanks, but the script does not include that. It seems Apple Mail.app  added that to the script.
>
> But my original script definitely just contains the email address.
>
>
>> Am 24.02.2017 um 17:05 schrieb Bob Sneidar via use-livecode <[hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>>>:
>>
>> Exclude the mailto: in each email address.
>>
>> Bob S
>>
>>
>>> On Feb 24, 2017, at 07:54 , Matthias Rebbe via use-livecode <[hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>>> wrote:
>>>
>>> Hi,
>>> did someone already tested the new mime library, especially the command mimeEncodeAsMIMEEmail.
>>>
>>> I tried it already and i am having problems to use the command with an attachment. My problem is, the attachment is not encoded and not added to the encoded message in the IT variable.
>>>
>>> This is my sample code i am using for it
>>>
>>> on mouseUp
>>> answer File "file"
>>> if it is empty then exit to top
>>> put it into tFile
>>> put URL ("Binfile:"&tFile) into tData
>>> set the itemdelimiter to slash
>>> put item -1 of tFile into tFileName
>>> put tFile into tAttachment["filepath"]
>>> put "tFileName" into tAttachment["name"]
>>> put tData into tAttachment["data"]
>>>
>>> put "[hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>> <mailto:[hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>>>" into tTo
>>> put "[hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>> <mailto:[hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>>>" into tCc
>>> put "[hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>> <mailto:[hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>>>" into tFrom
>>> put "this is the subject" into tSubject
>>> put mimeEncodeFieldAsMIMEMultipartDocument(the long id of field 1) into tBody
>>>
>>>
>>> mimeEncodeAsMIMEEmail tBody, tFrom, tTo, tCC, tSubject, tAttachment
>>>
>>> put it
>>> answer the result
>>> end mouseUp
>>>
>>> Shouldn´t that work? Or is there an error in it? The Result does not show any error.
>>>
>>>
>>> Regards,
>>>
>>> Matthias
>>> Matthias Rebbe
>>> Bramkampsieke 13
>>> 32312 Lübbecke
>>> Tel +49 5741 310000
>>>   +49 160 5504462
>>> Fax: +49 5741 310002
>>> eMail: [hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>> <mailto:[hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>>>
>>>
>>> BR5 Konverter - BR5 -> MP3 <http://matthiasrebbe.eu/portfolio/produkte/brx/ <http://matthiasrebbe.eu/portfolio/produkte/brx/> <http://matthiasrebbe.eu/portfolio/produkte/brx/ <http://matthiasrebbe.eu/portfolio/produkte/brx/>>>
>>>
>>> _______________________________________________
>>> use-livecode mailing list
>>> [hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>>
>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode <http://lists.runrev.com/mailman/listinfo/use-livecode>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>>
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode <http://lists.runrev.com/mailman/listinfo/use-livecode>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email] <mailto:[hidden email]>
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Loading...