Login
User Name:

Password:



Register

Forgot your password?
Hi - Clean SmaugFuss map/description issue..
Dec 15, 2024 7:29 pm
By Samson
AFKMud 2.2.4
Dec 10, 2024 4:09 pm
By Samson
I3 and IMC
Dec 8, 2024 6:35 pm
By Remcon
Ubuntu 22.04.5 LTS
Dec 5, 2024 5:10 pm
By Remcon
SmaugFUSS 1.8/1.9
Nov 29, 2024 11:46 am
By Remcon
SWFOTEFUSS 1.5.1
Author: Various
Submitted by: Samson
SWRFUSS 1.4.1
Author: Various
Submitted by: Samson
SmaugFUSS 1.9.5
Author: Various
Submitted by: Samson
AFKMud 2.2.4
Author: AFKMud Team
Submitted by: Samson
LOP 1.5
Author: Remcon
Submitted by: Remcon
Users Online
AhrefsBot, Bing, DotBot

Members: 0
Guests: 64
Stats
Files
Topics
Posts
Members
Newest Member
494
3,808
19,707
588
Mortrex

Today's Birthdays
There are no member birthdays today.
» SmaugMuds » Codebases » SWR FUSS » mail command
Forum Rules | Mark all | Recent Posts

mail command
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Jul 13, 2010 2:58 am   
Go to the top of the page
Go to the bottom of the page

Banner
Magician
GroupMembers
Posts169
JoinedNov 29, 2005

 
I'm using my MUD to parse information into the mail command, and while it works, I've yet to figure out how to change the 'From' address, but more importantly, how to add linebreaks to the message. Is it possible or would it be simpler to push it into a sendmail php script?

Post is unread #2 Jul 13, 2010 3:15 am   Last edited Jul 13, 2010 3:31 am by ayuri
Go to the top of the page
Go to the bottom of the page

ayuri
Magician
GroupMembers
Posts239
JoinedJun 13, 2008

 
Normally 'mail' is used by username@FQDN. Example, bob@foobar.com. AFAIK if you want it to come from a specific user, that user must be running mail. Or, you can pass the -U switch, or do a mail -f /var/mail/ (same as -U).

The mail editor is much like the editor 'ed' so, as to line breaks I'm going to have to say read up on ed and get to know it. I'm the heart of eVIl type of girl. In the end, it might just be simpler to pipe it all to a php script.


**EDIT
Forgot about mailx. It has an -r flag to do a 'from' field. Haven't tested it however.
**EDIT AGAIN
So, umm - mailx might not be the same as the opensource mailx. AIX system 5.x and 6.x have a mailx utility that I use at work to send messages to some users so they don't see 'from root@prodserver'. Instead they see 'cpmscriptserver@prodserver'.

Hope this helps some,
ayuri

Post is unread #3 Jul 18, 2010 9:54 am   
Go to the top of the page
Go to the bottom of the page

Banner
Magician
GroupMembers
Posts169
JoinedNov 29, 2005

 
If anyone else needs to know, I solved this with the following command:

echo "Test Message" | mail -a "Content-type:text/html;" -s "Testing Email" "email@domain.com"


The Content-type allows you to send a body through with html tags, such as
for spacing, or including images or the like.

Pages:<< prev 1 next >>