Cygwin sendmail | Unix Linux Forums | UNIX for Dummies Questions & Answers

  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 Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 02-05-2013
lawsongeek lawsongeek is offline
Registered User
 
Join Date: Aug 2011
Last Activity: 10 October 2014, 3:49 PM EDT
Posts: 77
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 02-06-2013
franzpizzo's Avatar
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 02-06-2013
lawsongeek lawsongeek is offline
Registered User
 
Join Date: Aug 2011
Last Activity: 10 October 2014, 3:49 PM EDT
Posts: 77
Thanks: 0
Thanked 1 Time in 1 Post
tried it, and same result at my end. thanks anyway.
    #4  
Old 02-06-2013
Yoda's Avatar
Yoda Yoda is offline Forum Advisor  
Jedi Master
 
Join Date: Jan 2012
Last Activity: 22 October 2014, 8:12 PM EDT
Location: Galactic Empire
Posts: 3,387
Thanks: 235
Thanked 1,209 Times in 1,135 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 Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 03:01 AM.