Operating Systems > Linux and UNIX
command line mail sender !
Master of Reality:
what does '/r' and '/n' do?
And can i specify an html file to send instead of writing the html in it just by specifying it, or do i have to tell it to 'cat body.html' or something?
Dammit now i want to learn perl.... But i am trying to learn C++ (only over online tutorials).
[ July 12, 2002: Message edited by: Master of Reality / Bob ]
voidmain:
It's not "/r", it's "\r", just like in C. "\r" is a CarriageReturn, and "\n" is a LineFeed or NewLine. In DOS/WIN lines in text files are terminated with a "\r\n". In UNIX they are terminated with just a "\n" (M$ is so wasteful). So it is best to use "\r\n" so that all mail programs can handle the headers.
To send an entire HTML file in place of the $mailbody variable you could do something like this:
Replace the
--- Code: ---
--- End code ---
with
--- Code: ---
--- End code ---
And yes, I would strongly recommend learning Perl. I believe it would be easier for a n00b programmer to learn, it's quick and easy and very powerful. And you will learn things in Perl that will apply to C. A lot of the stucture, looping and decisions are very similar to C.
[ July 13, 2002: Message edited by: VoidMain ]
Master of Reality:
any of the messages i have tried to send using mail or sendmail have not reached me. Is there something i need to configure for it?
voidmain:
quote:Originally posted by Master of Reality / Bob:
any of the messages i have tried to send using mail or sendmail have not reached me. Is there something i need to configure for it?
--- End quote ---
If the messages bounced they would end up in your mailbox (or root's mailbox). Just run "pine" to read the local mail messages and it should contain the cause of the bounce. Usually it will be spam control on the receiving server. What you need to do to resolve it will depend on the bounce messages. It will usually mean you need to change the configuration of sendmail (/etc/mail/sendmail.mc etc).
I will not be able to help any more until Sunday night or Monday if you need help with Sendmail. You might find enough info on the net to get it configured on your own.
[ July 13, 2002: Message edited by: VoidMain ]
foobar:
So void - lemme get this straight: (correct me plz!)
- Sendmail can send mail to external users, that is, someone who is not connected to your local network, and picks his mail up from an external server (like pop or web-based)
- So you do not have to specify an SMTP server just to get the message sent
- But CAN you send via an external SMTP server ? (e.g. mail.quakeguy.myweb.nl is mine) and how ? (maybe it will help you get rid of spam control)
And some q's:
- Is it possible, in linux scripting, to make labels by using c-style ':' ?
like:
--- Code: ---
--- End code ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version