Operating System - OpenVMS
1828413 Members
3322 Online
109977 Solutions
New Discussion

Sending mail via SMTP and getting extra lines in text at other end

 
SOLVED
Go to solution
Sante Michelangelo
New Member

Sending mail via SMTP and getting extra lines in text at other end

Hello,
I am sending mail in VMS (simple text) to an internet address and when I read the message at the receiving end
I get two extra blank lines at the other end, one at the top and one at the bottom.
Example below:

$
$ type TEST.FILE
Line one "note no blank lines above" created on VMS Side.
Line two
Line Three
Line Four
Line Five "note no blank line below"
$mail test.file/sub="test file" SMTP%"sante_michelangelo@idx.com"
$

On the receiving end it looks like this...


Line one "note no blank lines above" created on VMS Side.
Line two
Line Three
Line Four
Line Five "note no blank line below"


Is there a logical or setting that can be set on the VMS side to exclude these two extra lines.
Thanks in advance.
Sante
14 REPLIES 14
Joseph Huber_1
Honored Contributor
Solution

Re: Sending mail via SMTP and getting extra lines in text at other end

What makes You think VMS mail is inserting these "lines" on top and bottom ?

You are not sending a file, but a mail message.
On the receiver side , You receive mail, and then produce a file by some means (save as ..., extract, cut/paste ?).

Send the same file to Your VMS account, and see if You get the same. (I bet no).
Mail messages received consist of header lines, then a blank line, followed by the text body.
Is it up to the mail reader to strip of the headers, and format the body for the screen.

If You want to make sure to get exactly the file, then enclose it in a MIME section or attachment, e.g. using the MIME facility on VMS (see HELP MIME).

Mail from VMS to VMS can be sent using the /FOREIGN qualifier in MAIL.
http://www.mpp.mpg.de/~huber
Garry Fruth
Trusted Contributor

Re: Sending mail via SMTP and getting extra lines in text at other end

I'd be curious to see a DIR/FUL TEST.FILE. Perhaps there is something about the file characteristics that causes mail to add a blank line. . . . Although I'm inclined to agree with Joseph.
Joseph Huber_1
Honored Contributor

Re: Sending mail via SMTP and getting extra lines in text at other end

I just verified with a mail sent from and to VMS:

The message body really contains only the text as entered (or is in the file sent).
If there is a signature, then an empty line is inserted between the body and the signature.
You can see the exact mail body in VMS if You send a message big enough to generate an external MAIL$*.MAI file.
VMS mail (the reader/user interface), by the way, does also add a line in front and after the body text.

One possible line could also result from sending with /SINATURE, but no file, or an empty signature exists.
Send the file with explicit /NOSIGNATURE
If the empty line is still there, then it is Your mail reader which inserts the lines.
http://www.mpp.mpg.de/~huber
Dirk Bogaerts
Frequent Advisor

Re: Sending mail via SMTP and getting extra lines in text at other end

To see exactly what is exchanged between VMS and the external smtp-gateway, define the system logical TCPIP$SMTP_LOG_LEVEL = 5. After restarting SMTP, you'll find in sys$specific:[tcpip$smtp]TCPIP$SMTP_LOGFILE.LOG the details of the smtp-transmission (see 'send buf' & 'recv buf' lines) :
...
#smtp_sender_cmd\1746 Entering smtp_sender_helo
send buf=HELO VMSmachine.aaaa.bbbb.ccc\0d\0a
#smtp_net_util\354 smtp_read_reply,fd=4,buf=,len=4096,cookie=1,timemin=5,timeno
#smtp_read_reply:B4 select: vaxc$errno=1, errno=0
#smtp_read_reply:After select: vaxc$errno=1, errno=0
#smtp_read_reply:select:status=1
#smtp_read_reply:rmask=16,wmask=0,emask=0
#smtp_read_reply:recv:status=102, vaxc$errno=1
recv buf=250 SMTPgateway.aaaa.bbbb.ccc Hello VMSmachine.aaaa.bbbb.ccc
#smtp_read_reply:end_of_reply=1
#smtp_read_reply:returning 1
...

First exchanges are identification & header info, after that the extact contents of the message will show up line by line. There you might find the extra blank lines (but I expect you will not find any).
Wim Van den Wyngaert
Honored Contributor

Re: Sending mail via SMTP and getting extra lines in text at other end

Also a simple debugging tool is tcptrace xxx /full
where xxx is the address of the mail server.

Wim
Wim
Joseph Huber_1
Honored Contributor

Re: Sending mail via SMTP and getting extra lines in text at other end

Attached is a logfile, which clearly show TCPIP$SMTP does not add lines to the message body. The message in my file starts with a line "FIRST" and ends with "LAST". Sent by the command
mail/nosign/noedit/noself test.txt "huber@mppmu.mpg.de"

So Sante has to ask himself: how did I get the file out of my mail reader ?
http://www.mpp.mpg.de/~huber
Hein van den Heuvel
Honored Contributor

Re: Sending mail via SMTP and getting extra lines in text at other end


Sante, Sounds like a problem on the receiving end.
What if you send the same message from a non-vms system. Does it look different?

Garry, if it was a problem is record attributes, then I would expect the problem to be visible with each record, not just begin and end.

fwiw,
Hein.
Sante Michelangelo
New Member

Re: Sending mail via SMTP and getting extra lines in text at other end

Hello, First Thank you all for responding to my request. I know its VMS mail inserting the lines because If I send the same file to my VMS mail account you can see the blank lines. If you extract the file on the VMS side with /noheader the file looks fine. Since the file is going out the lines become a problem. I am trying the other items that where suggested.
Joseph Huber_1
Honored Contributor

Re: Sending mail via SMTP and getting extra lines in text at other end

No, this is exactly NOT what happens. You SEE these lines on top and bottom in the mail reader , the "visual interface": it is for screen formatting only.
The fact that an extracted file does NOT contain these lines clearly proves it.
(And the SMTP log file also shows these lines are NOT sent to the SMTP server at the other end).

So to repeat: You have to solve the problem "at the other" end of the line, at the receiver side, not the VMS sender.
http://www.mpp.mpg.de/~huber
Hein van den Heuvel
Honored Contributor

Re: Sending mail via SMTP and getting extra lines in text at other end

>> Hello, First Thank you all for responding to my request. I know its VMS mail inserting the lines because If I send the same file to my VMS mail account you can see the blank lines.

I don't think so.

The VAXmail GUI will SHOW blank lines to ease reading, but they do not exist.

You other gui appears to insert 2 blanks pre, 1 post message.

>> If you extract the file on the VMS side with /noheader the file looks fine.

Exactly. Proving the data is clean, the presentation trying to help.


Hein.
Sante Michelangelo
New Member

Re: Sending mail via SMTP and getting extra lines in text at other end

Good Morning All,
Joseph, I enclosed the file in a MIME section and it worked great. Thank you
And thank you all for the responses/feedback.
Ian Miller.
Honored Contributor

Re: Sending mail via SMTP and getting extra lines in text at other end

See
http://forums1.itrc.hp.com/service/forums/helptips.do?#33

for how to assign points to each response. The points system is the feedback used here so people can find helpful answers and people.
____________________
Purely Personal Opinion
Sante Michelangelo
New Member

Re: Sending mail via SMTP and getting extra lines in text at other end

I enclosed the file in a MIME section and it worked great.
Grace Drennan
New Member

Re: Sending mail via SMTP and getting extra lines in text at other end

I believe I worked with you at NCS. If possible, please contact me @
erin_mcquillan@hotmail.com