Problem with sending mail attachments

Author Message

Michaƫl Todorovic

Friday 29 October 2010 2:48:56 am

Hello,

In ezpublish 4.2, I was sending emails with attachments to lotus notes and it was working.

Now in ezpublish 4.3, I do the same but attachments are not shown in lotus. I see the email source instead (with mime and base64 encoded attachments). When I send the same email on other mail client (like zimbra or yahoo), attachments are shown correctly.

Here the code I'm using :(from http://ezcomponents.org/docs/api/latest/introduction_Mail.html#sending-a-mail-with-the-composer)

"
  1. <?php
  2. require_once 'tutorial_autoload.php';
  3. // Create a new mail object
  4. $mail = new ezcMail();
  5. // Specify the "from" mail address
  6. $mail->from = new ezcMailAddress( 'sender@example.com', 'Bernard Bernoulli' );
  7. // Add one "to" mail address (multiple can be added)
  8. $mail->addTo( new ezcMailAddress( 'receiver@example.com', 'Wendy' ) );
  9. // Specify the subject of the mail
  10. $mail->subject = "This is the subject of the example mail";
  11. // Create a text part to be added to the mail
  12. $textPart = new ezcMailText( "This is the body of the example mail." );
  13. // Create a file attachment to be added to the mail
  14. $fileAttachment = new ezcMailFile( "~/myfile.jpg" );
  15. // Specify the body of the mail as a multipart-mixed of the text part and the file attachment
  16. $mail->body = new ezcMailMultipartMixed( $textPart, $fileAttachment );
  17. // Create a new MTA transport object
  18. $transport = new ezcMailMtaTransport();
  19. // Use the MTA transport to send the created mail object
  20. $transport->send( $mail );
  21. ?>
"

What can I do ?

Thank you

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 30 2025 19:46:28
Script start
Timing: Jan 30 2025 19:46:28
Module start 'layout'
Timing: Jan 30 2025 19:46:28
Module start 'content'
Timing: Jan 30 2025 19:46:28
Module end 'content'
Timing: Jan 30 2025 19:46:28
Script end

Main resources:

Total runtime0.0207 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0041 588.2344151.2109
Module start 'layout' 0.00410.0034 739.4453220.6953
Module start 'content' 0.00750.0118 960.1406998.0078
Module end 'content' 0.01930.0014 1,958.148429.9766
Script end 0.0207  1,988.1250 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002311.3164140.0002
Check MTime0.00104.6746140.0001
Mysql Total
Database connection0.00062.819910.0006
Mysqli_queries0.00209.746730.0007
Looping result0.00000.039110.0000
Template Total0.00105.010.0010
Template load0.00083.817310.0008
Template processing0.00021.113510.0002
Override
Cache load0.00052.636110.0005
General
dbfile0.00167.947280.0002
String conversion0.00000.024140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs