Unix/Linux Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Cygwin sendmail

UNIX for Dummies Questions & Answers


Closed Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 02-05-2013
lawsongeek lawsongeek is offline
Registered User
 
Join Date: Aug 2011
Last Activity: 25 March 2015, 5:59 PM EDT
Posts: 81
Thanks: 0
Thanked 1 Time in 1 Post
Cygwin sendmail

echo -e "This is a test and only a test" | /usr/sbin/sendmail -s "Subject" lawsongeek@blah.com

when i received email, all good, but Subject is blank.
Sponsored Links
    #2  
Old Unix and Linux 02-06-2013
franzpizzo's Unix or Linux Image
franzpizzo franzpizzo is offline
Registered User
 
Join Date: Feb 2013
Last Activity: 6 February 2014, 9:56 AM EST
Posts: 68
Thanks: 0
Thanked 12 Times in 12 Posts
Usually I code in this way:
DEST=to_address@doamin.com
CC=cc_address@doamin.com
FROM="From Name"
SUBJECT="My subject"
BODY="Something you want"
cat << _MAIL_ | /usr/lib/sendmail -F "${FROM}" -f "${FROM}" "${DEST}"
Subject:${SUBJECT}
CC:$CC
Content-Type: text/html;
$BODY
_MAIL_
Sponsored Links
    #3  
Old Unix and Linux 02-06-2013
lawsongeek lawsongeek is offline
Registered User
 
Join Date: Aug 2011
Last Activity: 25 March 2015, 5:59 PM EDT
Posts: 81
Thanks: 0
Thanked 1 Time in 1 Post
tried it, and same result at my end. thanks anyway.
    #4  
Old Unix and Linux 02-06-2013
Yoda's Unix or Linux Image
Yoda Yoda is offline Forum Advisor  
Jedi Master
 
Join Date: Jan 2012
Last Activity: 9 April 2015, 6:09 PM EDT
Location: Galactic Empire
Posts: 3,402
Thanks: 240
Thanked 1,216 Times in 1,142 Posts
Try:

Code:
{
  echo "To: lawsongeek@blah.com"
  echo "MIME-Version: 1.0"
  echo "Subject: Subject"
  echo "This is a test and only a test"
} | /usr/sbin/sendmail -t

Sponsored Links
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Unix or Linux Image More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
cygwin parthmittal2007 Shell Programming and Scripting 4 01-26-2012 12:36 PM
opening new instance of cygwin from withing cygwin Validatorian Shell Programming and Scripting 0 01-16-2012 06:17 PM
Anyone else use Cygwin? mr_manny UNIX for Dummies Questions & Answers 4 02-05-2010 03:28 AM
cygwin - sh-3.2$ help! bobby999 UNIX for Dummies Questions & Answers 1 04-22-2008 01:23 PM
Cygwin X fulgura UNIX for Dummies Questions & Answers 7 01-05-2008 08:34 PM



All times are GMT -4. The time now is 11:22 PM.