1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Problem with SENDMAIL /H

Discussion in 'Support' started by dcantor, Feb 6, 2010.

  1. dcantor

    Joined:
    May 29, 2008
    Messages:
    505
    Likes Received:
    3
    Starting with TCC v11, having two or more extra header specifications (/H) on the SENDMAIL command works incorrectly. The manual specifically allows multiple /H instances on the command.

    It acts as if an extra blank line were inserted into the outgoing message after each /H line; the received message has the first extra header specified with /H correctly in the headers, but then each additional extra header specified with /H shows up in the body of the message.

    Here's a simple .btm file:

    Code:
         sendmail /v ^
         /h"X-Test-Header-1: Test header 1" ^
         /h"X-Test-Header-2: Test header 2" ^
         /h"X-Composed-Date: %_dow, %_day %@left[3,%_monthf] %_year %_time %@if[%_tzo gt 0,-,+]%@right[4,%@strip[":",%@maketime[%_tzo]]]" ^
         %@option[mailaddress] "%@name[%_batchname]: Test extra headers"  "Testing the effect of extra headers."
    
    (I've broken up the command for legibility, but it works the same way if it's all on one physical line.)

    This results in the following text being received as the text of the message:
    Code:
    X-Test-Header-2: Test header 2
    
    X-Composed-Date: Sat, 6 Feb 2010 10:54:40 -0500
    
    Testing the effect of extra headers.
    I've verified that it works this way through two different outbound SMTP servers, and retrieved with two different POP clients to eliminate the possibility that the problem is at one of my usual mail server sites.

    Also, it makes no difference whether the text of the body or the filename containing the body is specified (with @) .

    To work around this problem for now, I've replaced the command SENDMAIL with "C:\...\TCMD10\TCC.EXE /C SENDMAIL" .

    This aspect of the SENDMAIL command works correctly in TCC v10.
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,728
    Likes Received:
    80
    Nothing changed in SENDMAIL in 11.0. This would have to be a bug in the new
    ipworks8.dll; I'll take a look but there may be nothing I can do about it
    other than report the problem to the ipworks developers and wait for a fix.
     
  3. dcantor

    Joined:
    May 29, 2008
    Messages:
    505
    Likes Received:
    3
    Thanks, Rex. For now I have a work-around, and I'll wait patiently for a new version of ipworks.
     
  4. Jay Sage

    Joined:
    Jun 2, 2008
    Messages:
    284
    Likes Received:
    1
    Dave Cantor wrote:

    Dave, I have been trying to figure out how to use SENDMAIL to create a
    multipart message with both plain text and HTML. Have you, by any
    chance, worked on that? The problem you discovered with multiple /H
    options might be related to the difficulty I encountered.

    -- Jay
     
  5. dcantor

    Joined:
    May 29, 2008
    Messages:
    505
    Likes Received:
    3
    Sorry, Jay, no I haven't looked at that. I'm just attempting to send simple text.
     

Share This Page