Announcement

Collapse
No announcement yet.

Send "Bcc" copies with emails?

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

    #16
    Re: Send "Bcc" copies with emails?

    Have you tried since the username and password features were added to MvSMTP?
    Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
    Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
    Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
    Facebook http://www.facebook.com/EmporiumPlus
    Twitter http://twitter.com/emporiumplus

    Comment


      #17
      Re: Send "Bcc" copies with emails?

      Kind of an old thread but has anything changed on SendMail function since Miva engine 5.22 update?

      On a page template I'm trying to include a reply-to header but get an error

      Code:
      //
      
      <mvt:assign name="g.replyto" value="'Reply-To: <' $ trim(g.cu_email) $ '>'" />
      
      //
      
      <mvt:do file="g.module_library_utilities" name="g.email_sent" value="SendEmail(g.to_email,g.from_email,'',g.subject,g.replyto,g.message)" />
      
      



      http://www.alphabetsigns.com/

      Comment


        #18
        Re: Send &quot;Bcc&quot; copies with emails?

        SendMail function has not changed.

        I ran that exact code and it worked for me. What error are you getting? In addition, you can try to have MvSMTP logging enabled which will show the exact exchange with the SMTP server.

        Let me know.

        Thanks.
        David Carver
        Miva, Inc. | Software Developer

        Comment


          #19
          Re: Send &quot;Bcc&quot; copies with emails?

          Kent

          The Miva 9 lsk contains this function in util_public.mv

          Code:
          <MvFUNCTION NAME = "v9_SendEmail" PARAMETERS = "email var" STANDARDOUTPUTLEVEL = "">
          	<MvASSIGN NAME = "l.to" 		VALUE = "{ l.email:to }">
          	<MvASSIGN NAME = "l.from" 		VALUE = "{ l.email:from }">
          	<MvASSIGN NAME = "l.cc" 		VALUE = "{ l.email:cc }">
          	<MvASSIGN NAME = "l.bcc" 		VALUE = "{ l.email:bcc }">
          	<MvASSIGN NAME = "l.subject" 	VALUE = "{ l.email:subject }">
          	<MvASSIGN NAME = "l.headers" 	VALUE = "{ l.email:headers }">
          	<MvASSIGN NAME = "l.message" 	VALUE = "{ l.email:message }">
          	<MvASSIGN NAME = "l.mailhost" 	VALUE = "{ g.Domain:mailhost }">
          Ray Yates
          "If I have seen further, it is by standing on the shoulders of giants."
          --- Sir Isaac Newton

          Comment


            #20
            Re: Send &quot;Bcc&quot; copies with emails?

            @David,

            Thanks for testing it out. I'm still having problems with Reply-To but it could be something else. How do I enable MvSMTP logging?
            http://www.alphabetsigns.com/

            Comment


              #21
              Re: Send &quot;Bcc&quot; copies with emails?

              Originally posted by alphabet View Post
              Kind of an old thread but has anything changed on SendMail function since Miva engine 5.22 update?

              On a page template I'm trying to include a reply-to header but get an error

              Code:
              //
              
              <mvt:assign name="g.replyto" value="'Reply-To: <' $ trim(g.cu_email) $ '>'" />
              
              //
              
              <mvt:do file="g.module_library_utilities" name="g.email_sent" value="SendEmail(g.to_email,g.from_email,'',g.subject,g.replyto,g.message)" />
              
              



              Just a thought - we use the header to add a reply-to as well, although we don't use SendEmail directly, but replicate the v9_SendEmail function. I've always had to terminate the header with a CR/LF. You might try it.
              Gordon Currie
              Phosphor Media - "Your Success is our Business"

              Improve Your Customer Service | Get MORE Customers | Edit Any Document Easily | Free Modules | Follow Us on Facebook
              phosphormedia.com

              Comment


                #22
                Re: Send &quot;Bcc&quot; copies with emails?

                Originally posted by alphabet View Post
                @David,

                Thanks for testing it out. I'm still having problems with Reply-To but it could be something else. How do I enable MvSMTP logging?
                If you're hosted with us file a ticket with support and they'll be able to set it up for you and help you further.

                If not, you can edit your mivavm.conf file and set your loglevel=2097152 and logfile=smtp.log and make your requests. Once a request is made you should be able to view the smtp.log file to view the handshake between the servers.
                David Carver
                Miva, Inc. | Software Developer

                Comment


                  #23
                  Re: Send &quot;Bcc&quot; copies with emails?

                  @Gordon

                  Brilliant, CRLF worked. Thank you very much.

                  I also found a related thread if anyone else is trying to add additional headers.

                  http://extranet.miva.com/forums/show...P-and-Reply-To

                  @David

                  Thank you That's a great reference.
                  http://www.alphabetsigns.com/

                  Comment


                    #24
                    Hi folks, I need to revive this thread; hope everyone's still reading.

                    What is the current situation for MM sending "Bcc" copies of emails? I just checked the LSK, and the v9_Send_Email function does accept a :bcc member in its input. But it apparently just concatenates those addresses onto the "To" header; it doesn't actually generate a "Bcc:."

                    Can Merchant send Bcc's or not, and if so, how?

                    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


                      #25
                      Use MvSMTP and create your own headers? You'd just set the noheaders flag and then construct your own, including BCC.
                      David Hubbard
                      CIO
                      Miva
                      [email protected]
                      http://www.miva.com

                      Comment


                        #26
                        David's suggestion will work great. If you want to leverage our existing API functions for this, I pulled this code from the Template Emails module in the LSK

                        Code:
                        <MvCOMMENT>
                            |
                            | Send the email
                            |
                            </MvCOMMENT>
                        
                            <MvASSIGN NAME = "l.email:from"                    VALUE = "{ trim( l.from ) }">
                            <MvASSIGN NAME = "l.email:to"                    VALUE = "{ trim( l.to ) }">
                            <MvASSIGN NAME = "l.email:cc"                    VALUE = "{ trim( l.cc ) }">
                            <MvASSIGN NAME = "l.email:bcc"                     VALUE = "{ trim( l.bcc ) }">
                            <MvASSIGN NAME = "l.email:subject"                VALUE = "{ trim( l.subject ) }">
                            <MvASSIGN NAME = "l.mime_type"                    VALUE = "{ trim( l.mime_type ) }">
                            <MvASSIGN NAME = "l.eol"                        VALUE = "{ asciichar( 13 ) $ asciichar( 10 ) }">
                            
                            <MvIF EXPR = "{ NOT l.email:send_b64 }">
                                <MvASSIGN NAME = "l.null"                    VALUE = "{ [ g.Module_Library_Utilities ].StartMimeEmail( l.mime_email ) }">
                                <MvASSIGN NAME = "l.null"                    VALUE = "{ [ g.Module_Library_Utilities ].GenerateBodyMIME( l.mime_email, l.mime_type, '', '', l.message ) }">
                                
                                <MvIF EXPR = "{ NOT ISNULL l.reply_to }">
                                    <MvASSIGN NAME = "l.mime_email:headers" VALUE = "{ 'Reply-To: ' $ l.reply_to $ l.eol $ l.mime_email:headers }">
                                </MvIF>
                        
                                <MvFUNCTIONRETURN VALUE = "{ [ g.Module_Library_Utilities ].v9_SendMimeEmail( l.mime_email, l.email ) }">
                            </MvIF>
                        
                            <MvASSIGN NAME = "l.base64_message"                VALUE = "{ crypto_base64_encode( l.message ) }">
                            <MvASSIGN NAME = "l.base64_message_len"            VALUE = "{ len_var( l.base64_message ) }">
                        
                            <MvCAPTURE VARIABLE = "l.email:headers">
                                <MvIF EXPR = "{ NOT ISNULL l.reply_to }">
                                    <MvEVAL EXPR = "Reply-To: "><MvEVAL EXPR = "{ l.reply_to }">    <MvEVAL EXPR = "{ l.eol }">
                                </MvIF>
                        
                                <MvEVAL EXPR = "Mime-Version: 1.0">                                    <MvEVAL EXPR = "{ l.eol }">
                                <MvEVAL EXPR = "Content-Type: "><MvEVAL EXPR = "{ l.mime_type }">    <MvEVAL EXPR = "{ l.eol }">
                                <MvEVAL EXPR = "Content-Transfer-Encoding: base64">
                            </MvCAPTURE>
                        
                            <MvCAPTURE VARIABLE = "l.email:message"><MvEVAL EXPR = "{ [ g.Module_Library_Utilities ].Chunk_Split_Output( l.base64_message, l.base64_message_len, 72, l.eol ) }"></MvCAPTURE>
                        
                            <MvFUNCTIONRETURN VALUE = "{ [ g.Module_Library_Utilities ].v9_SendEmail( l.email ) }">
                        Brennan Heyde
                        VP Product
                        Miva, Inc.
                        [email protected]
                        https://www.miva.com

                        Comment


                          #27
                          Hi folks, thanks for the info.

                          Brennan, that code snippet that you posted calls the library function v9_SendEmail. As I mentioned, that function doesn't really do Bcc's. That seems odd to me; it makes me wonder if the old bug is still there.

                          David, are you sure that your suggestion will work? If the bug had been fixed, I'd think that v9_SendEmail would have been modified to generate real Bcc's.

                          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


                            #28
                            Hey Kent,

                            Code:
                            But it apparently just concatenates those addresses onto the "To" header;
                            I think that is the way SMTP is suppose to work. BCC should be included in the RCT_TO command list field because you want it sent to someone. It just isn't seen by the receiver because it is not included as DATA.

                            I'm not sure I would include BCC as a header because the recipient may see it in the DATA message_headers.
                            http://www.alphabetsigns.com/

                            Comment


                              #29
                              Hi Dan, thanks for chiming in.

                              I must admit that I don't understand the low-level details of SMTP, so I don't fully understand what you wrote. But I took another look at the source code for v9_SendEmail, and I think what I wrote before is correct. The function just merges "Bcc" addresses with "To" addresses; it doesn't separate them out in any way, or pass any data to the MvSMTP tag to indicate that the Bcc's exist.

                              So ... is it time to put this back on the bug list? (Or is it still there?)

                              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


                                #30
                                This is a very old thread and our current built in modules support BCC by the way.
                                Thanks,

                                Rick Wilson
                                CEO
                                Miva, Inc.
                                [email protected]
                                https://www.miva.com

                                Comment

                                Working...
                                X