Results 1 to 10 of 10

Thread: Emailing attachments

  1. #1
    metamend is offline Junior Member
    Join Date
    Dec 2005
    Posts
    4

    Default Emailing attachments

    Greetings,

    I am having a slight problem with the Email feature of sugar.

    If I send emails without attachements, they are sent right away without problem,

    If I attach a file to an email, the email is not sent (at first).
    The message is saved and listed in the "Sent Emails" interface and has a send error under the status column.
    I then select the message for editing and click on send, Lo and behold the message gets sent with the attachment.

    This happens with each and every message that has an attachment. But never on messages without attachments.

    Anyone have the resolution?

    Apoligies if missed this problem/resolution in a previous thread. I haven't found it yet if there is one.

  2. #2
    sugarchris's Avatar
    sugarchris is offline Sugar Community Member
    Join Date
    Sep 2005
    Location
    San Francisco, CA
    Posts
    861

    Default Re: Emailing attachments

    Are there any errors in the sugarcrm.log with regards to sending email?

  3. #3
    metamend is offline Junior Member
    Join Date
    Dec 2005
    Posts
    4

    Default Re: Emailing attachments

    Quote Originally Posted by sugarchris
    Are there any errors in the sugarcrm.log with regards to sending email?
    Unfortunately there is not, I've set
    'debug' => 1,

    in config.php but that doesn't seem to help generate any debug messages for this problem. I will increment that and see what kind of results I get. If there's another place where I can enable more debugging on I am not aware of it. Thanks for the reply.

    Edit - I've found the debugging options in the log4php.properties file. Will do further testings.
    Last edited by metamend; 2006-03-15 at 07:43 PM.

  4. #4
    likhobory's Avatar
    likhobory is offline Sugar Community Member
    Join Date
    Jun 2006
    Location
    Moscow, RUSSIA
    Posts
    31

    Default Re: Emailing attachments

    Greetings,
    i have the same problem

    Version: 4.2.0a
    os: winxpsp2


    my log file after sending email with attachm:

    FATAL SugarCRM - Error emailing:File Error: Could not open file: C:\WINDOWS\TEMP\php691.tmp


  5. #5
    shri is offline Junior Member
    Join Date
    Jun 2006
    Posts
    3

    Default Re: Emailing attachments

    Hi there,

    Same problem here.

    Tue Jun 27 04:24:28 2006,207 [19415] FATAL SugarCRM - Error emailing:File Error: Could not open file: /tmp/phpoHZVjH

    Version 4.2.0d

    The file does get stored correctly in the ./cache/upload directory.

    Not well versed enough to track this, but am pretty familiar with PHP, so let me know what info you folks need.

  6. #6
    shri is offline Junior Member
    Join Date
    Jun 2006
    Posts
    3

    Default Re: Emailing attachments

    Quick FYI ...

    I've traced the following

    1) The send method is SMTP, with authentication

    2) The file gets stored correctly in /cache/upload in the CRM directory. However, when the software gets to AddAttachment in the phpmailer class it is looking for the file in the /tmp directory.

    Have to run for a meeting. Let me know if you need anymore debugging.

  7. #7
    shri is offline Junior Member
    Join Date
    Jun 2006
    Posts
    3

    Default Re: Emailing attachments

    Patched this with a .htaccess

    php_value upload_tmp_dir /home/site_dir/www/crm/cache/upload

  8. #8
    avalanche is offline Junior Member
    Join Date
    Jun 2005
    Posts
    1

    Default Re: Emailing attachments

    Quote Originally Posted by shri
    Patched this with a .htaccess

    php_value upload_tmp_dir /home/site_dir/www/crm/cache/upload
    I'm having the same issue. The file is correctly uploaded to the cache/upload directory, but then for some reason it still looks in /tmp for the file and dies with a fatal error. I tried making the suggested change to my .htaccess file, but it didn't do the trick.

    The directive 'upload_tmp_dir' is changable in PHP_INI_SYSTEM, does this include .htaccess files?

  9. #9
    jyim's Avatar
    jyim is offline Sugar Team Member
    Join Date
    Mar 2006
    Location
    Cupertino, CA
    Posts
    943

    Default Re: Emailing attachments

    I believe this issue has been fixed in 4.2.1b, which will be available soon.

    In the meantime, you may try the following code changes (which are the changes made in 4.2.1b) to see if they fix your issue:

    In modules/Emails/Email.php, please change:

    1)
    $file_location = $note->file->temp_file_location;
    to
    $file_location = $sugar_config['upload_dir'].$note->id.$note->file->original_file_name;

    2)
    $filename = substr($filename, 36, strlen($filename)); // strip GUID for PHPMailer class to name outbound file
    to
    $filename = $note->file->original_file_name;

  10. #10
    alejandrops is offline Sugar Community Member
    Join Date
    Jul 2006
    Location
    Buenos Aires
    Posts
    59

    Default Re: Emailing attachments

    Hi, I 'm having troubles sending attachments in Sugar 4.2.1b
    when I sed e-mails with attachments I got a blank screen and email is lost. dissapeared from sent emails, nos is associated with any accounts. BUT is sent! so, the client gets the e-mails but i lost track. what can I do?

    PS: I cant make Sugar to check emails automaticaly, I must press the check button every time, no matter how many times mi scheduler runs my sugar.bay in my W2000 server.

    thanks!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •