Announcement

Collapse
No announcement yet.

Problem using Send_Email_Attachment

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Problem using Send_Email_Attachment

    Hi folks,

    I'm working on a custom report module, and the client wants it to email the file to him. I wrote some code using the library function Send_Email_Attachment. I've used this function successfully before; but in the new module, it isn't working. The error messages is "Expected quote," which is coming from the function EmailNameLong. The code gets pretty complicated ... Can someone tell me what the problem is here? Do I need to use that Add_AngleBrackets function or something?

    Thanks --
    Kent Multer
    Magic Metal Productions
    http://TheMagicM.com
    * Web developer/designer
    * E-commerce and Miva
    * Author, The Official Miva Web Scripting Book -- available on-line:
    http://www.amazon.com/exec/obidos/IS...icmetalproducA

    #2
    Follow-up: when I checked my incoming mail, I found that the module WAS sending the emails, despite the error message. Apparently Send_Email_Attachment will send the message, with the attached file, even if it detects an error and returns zero. My old module just ignored the return value, but the one I'm writing now checked it and displayed the error message. -- until now; that error message is going away :^) .

    I'd still like to know what's causing the error, if anyone knows ... Thanks --
    Kent Multer
    Magic Metal Productions
    http://TheMagicM.com
    * Web developer/designer
    * E-commerce and Miva
    * Author, The Official Miva Web Scripting Book -- available on-line:
    http://www.amazon.com/exec/obidos/IS...icmetalproducA

    Comment


      #3
      Any chance you're setting MvSMTP FROM = to a value that includes anything other than an email address? I've seen that error if trying to set a display name in the from or to attributes; those fields should only contain a raw email address. To set a From display name you should instead set the noheaders flag and define the From: line yourself, which permits quotes.
      David Hubbard
      CIO
      Miva
      [email protected]
      http://www.miva.com

      Comment


        #4
        Hi David, the module was calling Send_Email_Attachment directly, and the MvSMTP is quite a bit further "downstream," so I don't know exactly what was being passed to it. I did put a debugging message in my code to verify that I was passing valid "To" and "From" addresses to Send_Email_Attachment. Once I got it working, I didn't look any further. Thanks for the suggestion --
        Kent Multer
        Magic Metal Productions
        http://TheMagicM.com
        * Web developer/designer
        * E-commerce and Miva
        * Author, The Official Miva Web Scripting Book -- available on-line:
        http://www.amazon.com/exec/obidos/IS...icmetalproducA

        Comment

        Working...
        X