| Author |  | 
      
        | Ayumiesan Newbie
 
  
 
 Joined: 03 March 2016
 Online Status: Offline
 Posts: 11
 | 
          Hi,
           | Posted: 14 April 2016 at 6:55am | IP Logged |   |  
           | 
 |  I have a problem when i use "webmail/#single-compose/to/mailto:my_mail?subject=my_subject&body=my_body
 
 When i put only the mail and the subject, everything is ok but when i try to put a full body message, specials caracters make problem, how i can fix that ?
 
 I tried to put urlencode() but a message is displayed : "VM2970 app.js?767:6145 Uncaught URIError: URI malformed"
 
 You can find here my html code witch replace "my_body" :
 $html = '';
 $html .= '<br><br><br><br>';
 $html .= '<p>---- Message d\'origine ----<br>';
 $html .= 'De: Doe <doe@orange.fr><br>';
 $html .= 'A: John <john@gmail.com><br>';
 $html .= 'Envoyé le: mer., avr. 13, 2016, 16:26<br>';
 $html .= 'Sujet: Contentieux / 2 pièces jointes<br><br>';
 $html .= $mail->getHtml();
 
 Thanks for your help,
 Delphine Achini
 
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Igor AfterLogic Support
 
  
 
 Joined: 24 June 2008
 Location: United States
 Online Status: Offline
 Posts: 6168
 | 
          Hi Ayumiesan,
           | Posted: 15 April 2016 at 4:15am | IP Logged |   |  
           | 
 |  
 We tried to compose the message like in your PHP code:
 
 
 
| Code: 
 
    
    | 
      
       | <br><br><br><br><p>---- Message d'origine ----<br>De: Doe <doe@orange.fr><br>A: John <john@gmail.com><br>Envoyé le: mer., avr. 13, 2016, 16:26<br>Sujet: Contentieux / 2 pièces jointes<br><br> |  |  |  
 Then we did urlencode with it:
 
 
 
| Code: 
 
    
    | 
      
       | %3Cbr%3E%3Cbr%3E%3Cbr%3E%3Cbr%3E%3Cp%3E----%20Message%20d%27origine%20----%3Cbr%3EDe%3A%20Doe%20%3Cdoe%40orange.fr%3E%3Cbr%3EA%3A%20John%20%3Cjohn%40gmail.com%3E%3Cbr%3EEnvoy%C3%A9%20le%3A%20mer.%2C%2 0avr.%2013%2C%202016%2C%2016%3A26%3Cbr%3ESujet%3A%20Contentieux%20%2F%202%20pi%C3%A8ces%20jointes%3Cbr%3E%3Cbr%3E |  |  |  
 Then we put it in mailto url with our WebMail installation:
 
 
 
| Code: 
 
    
    | 
      
       | https://webmail.afterlogic.com/#single-compose/to/mailto:my_mail?subject=my_subject&body= %3Cbr%3E%3Cbr%3E%3Cbr%3E%3Cbr%3E%3Cp%3E----%20Message%20d%27origine%20----%3Cbr%3EDe%3A%20Doe%20%3Cdoe%40orange.fr%3E%3Cbr%3EA%3A%20John%20%3Cjohn%40gmail.com%3E%3Cbr%3EEnvoy%C3%A9%20le%3A%20mer.%2C%2 0avr.%2013%2C%202016%2C%2016%3A26%3Cbr%3ESujet%3A%20Contentieux%20%2F%202%20pi%C3%A8ces%20jointes%3Cbr%3E%3Cbr%3E |  |  |  
 And it works exactly like expected. But I don't know what the last part of your message contains. May be it contains some symbols that caused the error. Can you please provide us that part of your message?
 
 --
 Regards,
 Igor, AfterLogic Support
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Ayumiesan Newbie
 
  
 
 Joined: 03 March 2016
 Online Status: Offline
 Posts: 11
 | 
          Hi, thanks for response.
           | Posted: 15 April 2016 at 5:45am | IP Logged |   |  
           | 
 |  
 First, urlencode whith the first part is almost ok, i have some "+" instead of space :
 ----+Message+d'origine+----
 De:+Delphine+Achini+
 A:+ayumie52@gmail.com+
 Envoyé+le:+mer.,+avr.+13,+2016,+16:26
 Sujet:+Contentieux+/+2+pièces+jointes
 
 Second, my html can be everything, i can have some images, some text with different type. I get him with :
 $oApiMailManager = CApi::Manager('mail');
 $mail = $oApiMailManager->getMessage(........);
 $mail->getHtml();
 
 So i have plain html with docType, <html>, <head> ....
 
 If i can't send that on html link, can i send id_mail or use other function for getting composePopup with body of a specific mail ?
 
 
 Thanks.
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Ayumiesan Newbie
 
  
 
 Joined: 03 March 2016
 Online Status: Offline
 Posts: 11
 | 
          Hi,
           | Posted: 15 April 2016 at 6:55am | IP Logged |   |  
           | 
 |  
 Thanks for yours responses and sorry for time passed, i finnaly found that we can call "single-compose" with different values like :
 To : to create a new mail
 reply : to make response
 ...
 
 Thanks again for your help,
 Regards,
 Delphine Achini
 
 | 
       
        | Back to Top |     | 
       
       
        |  |