How to Build Email Message in Unix

Hi All,
I have a situation where i need to send a mail based on a unix script. And now the problem is that the mail which i sent should have the values i pass to it as parameters like...
1. From:
2. To:
3. Subject:
4. Attachment:
I am passing all the above 4 values to my shell script as parameters and it is indeed taking my values also, but the problem is with From: This is not taking the value what i pass but rather it is taking the From address from the instance.
Example: when i run the script with the above 4 parameters the value i am passing to From: is something like this [email protected], and when i fire it is coming as [email protected] which is because it is being fired from that instance....
Now i want to replace that with my parameter value....how to do that..
Any suggestions are highly appreciated.
Thanks & Regards,
Kalyan.

user527562, the problem is the question itself, not the contents. There is too few information.
You want to send mail based on a unix script...
What operating system are you using?
If I assume it is a unix (aix/hpux/solaris/tru64/etc.) or linux (rh/sles/debian/etc.) you probably use a readily configured mail system on the machine (postfix or sendmail are the most common here), or do you talk to a SMTP server directly?
What mail command do you use in the script?
A blind guess would be your system is configured to forward local email to a mailhub which is connected to the internet or another facility which enables you to read the mail sent, which means postfix or sendmail arranges the from for you. But again: this is a blind guess (!!)

Similar Messages

  • How to delete email messages

    How to delete all old email messages that I neglected to delete after reading.  Is there a easier way than editing and then selecting the delete button for each email message?

    There is no easy way. Perhaps you could use your computer or use web mail of your account supports this - these methods would be faster (for IMAP accounts).

  • In Mountain Lion, how to print email message without the attachments.

    Would like to print only the transmittal part of the email without printing the attachments - tried reply or forward and printing, but still wants to print the attached pdfs.  I know someone out there knows how - help please?

    Not sure if this will work, but could try this: select the message then hit Cmd-Shift-S. My thinking is this will save it as a Text Edit document (save it to the Desktop), text only, without the attachment. Then, in Text Edit, select Format>Wrap to Page and print.
    EDIT: just checked this with an email with an attachment. Came up as text only, minus the attachment.
    Message was edited by: WZZZ

  • How to keep email messages on iPhone using iCloud

    I can't figure out how to keep opened email on my iPhone.  If I have previously opened message on my iMac and it is in the Inbox on my iPhone, it disappears as soon as I try to open it.    Often I want to re-read a message.   Surely there must be a way to keep them for a period of time on the iPhone.
    John

    You could just pay for backup space (if iCloud offers it). I am only familiar with MobileMe, so I am not sure. This may help.

  • How to mark email messages as Not Junk?

    When I look in the Junk email folder in Mac Mail, I see messages that I did not mark as junk mail.  I guess Mac Mail is somehow filtering and classifying the messages as junk.  Within the Junk folder, however, there are messages that are not junk.  How to I mark these items (and future messages from the same source) as not junk, so that they appear in my Inbox and not in my Junk folder?
    What I Think I Am Supposed To Do
    1. Open a message in the Junk folder that I do not want to be classifled as junk.
    2. By default, a "thumbs down" icon appears in the toolbar (View > Show Toolbar).  I click on thumbs down to mark the message as junk. The thumbs down icon changes to a "thumps up" icon.
    3. I click on the thumbs up icon to mark the item as not junk
    Is this the right thing to do?  When I do the above steps, the message remains in the Junk folder - it does not move my Inbox folder.  But will future messages from the same source go into my Inbox?
    Thanks

    In case other are having this problem: With Outlook.com email, I found that mark email items as Not Junk within Mac Mail had not effect.  Subsequent emails from the same sender still went into the Junk folder.
    I had to sign on to my Outlook.com email at www.outlook.com website and mark the emails there as Not Junk.  Subsequent emails from the same sender than arrived in my Mac Mail Inbox, as desired.

  • How to edit email message suject line?

    I am wondering how to edit the incoming email's suject line with javamail api?
    and which api defines the subject line of an email?
    regards
    Gaz

    The simple answer is "you can't".
    Mail servers don't allow you to change messages.
    What you can do is make a copy of the message and change the copy.
    Of course, the copy won't be stored anywhere permanently so if you want
    to keep it you'll need to store it in a folder yourself.
    In your second question are you asking about the getSubject method?
    Since that's such an obvious answer to your question I'm sure you would've
    found that yourself so I'm assuming you're asking something else, but I don't
    understand what.

  • How to stop email messages "Delivery has failed"?

    For more than 6 months there have been constant messages. Now 100 a day! They all end in .ru with many different names in front. Do I have to cancel my .me address to stop this? How would I do that?

    Hi Chris,
    in addition to "cdeatherage" (if we both are on the right track what concerns your question).
    3. Look at your providers website and activate his spam protection.
    4. Talk to your provider and ask him about his possibilities.
    5. Insert your own eMail-address only as a jpg-file (image-file)
    6. Replace the @ with a written "at"
    7. and more ... you could even look to Google.
    Good luck!
    Hans-Guenter
    P.S.
    Answer should be directed to "Jim Brasil".

  • How to delete email messages all at once?

    Please let me know how to delete all my email messanges from my pnone.  I know how to delete 1 art a time, but this way would take me forever.

    You can only select all and delete all from the trash folder.
    You may already know this, but to save a little time deleting each one, you can swipe left from the list of messages and delete, instead of opening each one and selecting the trash can.

  • How to copy email messages between 2 accounts on IMAP server side

    Hello,
    I have a need that I'm not yet able to solve on my Mac Mini Server (OSX10.9.4 build 13E28 - Server 3.1.2 build 13S4517).
    I have configured and started my Server with the IMAP Server that manage my emails domain; at the moment I have 8 accounts able to retrieve emails from the external ISP, send emails outside through the same ISP and manage locally the emails exchange. All it's working as good as well.
    Now, caused by operative needs of the company, all the emails of a specific account should be copied/forwarded/duplicated (one of this solution would be indifferently accepted) to a different account. The second account isn't configured on the ISP site but only my Server and should be used as a something similar to a live-backup of the first account. This is necessary because the first account "can be / has to be" managed by a lot of people (we know that this behavior could be dangerous for the integrity of the mail repository but we can't do in a different way...) and so we need to create a second account that will be managed by the administrator only to handle in real-time possible recoveries...
    Have someone ideas/suggestion about a standard way (i.e. I mean something already foreseen inside Maverick/Server app) that we can follow to configure the environment that I've described?
    Thanks a lot for your help and support

    Irina, I don't think the mail api is not really designed for that. To do things at the database level, you might want to look at streams to pump all changes over to an archive database.
    However one thing to bear in mind is that if you are capturing changes in the user's mail folder then you do not have an authoritative record of all mail (just an archive of what actually made it into their folders (e.g. if they choose not to keep a sent copy, then you will not have it in your archive).
    For this reason, true compliance archiving usually aims to intercept the smtp delivery process (either as an intermediate gateway or plugin to a gateway .. google for such products).
    you would normally do this at your corporate smtp gateway. unfortunately, I don't believe you can internally intercept/hook the OCS smtp process with 100% reliability (e.g. via a trigger), so I'd suggest you look at external smtp solutions if you really need compliance archiving.
    hth

  • How to create email message filter that will AND multiple keywords in the message body

    Greetings,
    I am using BlackBerry Desktop Manager (version 4.3.0.17) and I need a filter that will match ALL keywords in the body of a note rather than ANY one of a list of keywords. I understand that separating keywords with a semicolon will match on any one of them, but I would like to match on ALL keywords that may be interspersed throughout the body of the email. In other words, I understand that the semicolon works like an OR connector. I need a connector that works like an AND.

    Hi bik,
    >> how to use the F keys to apply the tagging mentioned below and the direction of how to do the tagging and make the tag invisible in a text editor but not the text file. 
    It is unclear to me. Like you mentioned F keys, how does it work for?  And Could you show us some code with a simple sample or a capture? It could be better to help us understand more.
    In addition, I found a related thread
    Tag editing in a WPF TextBox. Not sure if it is useful for you. Thanks.
    Have a nice day!
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to sort email messages on iPod Mail

    I am using my iPod to download my Gmail messages. In Gmail, my Inbox and All Mail boxes are all sorted by date so that the most recent message are on top.
    But when I use iPod to check my Gmail, my messages are sorted by the OLDEST on top! Is there a way to sort messages shown on my iPod??
    Thanks
    Sookyas

    Hello роман255,
    The article linked below details how to manage spam in your iCloud e-mail both via iCloud.com and your iOS device.
    iCloud: Why am I getting junk mail (spam)?
    http://support.apple.com/kb/TS4019
    Cheers,
    Allen

  • TS2755 how to delete email messages that won't move to trash

    Mail messages won't move to trash. Mail account is used on 4  other devices.

    Try turning the account off and on : Settings > Mail, Contacts, Calendars , then tap the account on the right, slide Mail to 'off', exit settings and go back into the Mail app, and then go back to Settings and slide Mail back to 'on'
    If that doesn't work then try closing the Mail app via the taskbar : from the home screen (i.e. not with the Mail app 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the Mail app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    Another option is a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.
    If you still can't delete them then go into Settings > Mail, Contacts, Calendars,  select the account on the right-hand side of that screen, select Account, then Advanced, Deleted Mailbox, and under On The Server tap the 'Trash' folder so that it gets a tick against it - then come out of that series of popups by tapping on the relevant buttons at the top of them and then see if you can delete emails.

  • How to send html messages using unix mail ?

    Hi,
    I'm wondering if it's possible to send html formated mail using Unix mail command ?
    Regards,
    Didier.

    It works fine for me right out of the box; I've done zero to configure anything. In my case, I presume the HTML is encoded in a file. Then I invoke a script which adds the following mail headers before the HTML, then calls sendmail:
    <pre class=command>MIME-Version: 1.0
    Content-type: text/html; charset=ISO-8859-1
    To: $address
    From: $MY_EMAIL
    Subject: File: $subject
    </pre>
    In the header, variables $address, $MY_EMAIL, and $subject are filled in by the shell script.
    HTH

  • How to build ODBC app on UNIX

    Hi There,
    I have Windows app which using ODBC for database conectivity. Now trying to port to UNIX and want to use ODBC. Does SUN compiler comes with ODBC libraries? What are the ODBC library option I have on UNIX?
    Thanks,
    Milind

    You'll have to check that out for yourself, I decided to use OTL "http://otl.sourceforge.net/home.htm" after a quick review of options for my application.
    /Lars

  • How to stop email messages

    What do I have to do to stop emails from being sent to me?  I have email notifications turned off but I keep receiving emails.
    Please Help

    Hi Chris,
    in addition to "cdeatherage" (if we both are on the right track what concerns your question).
    3. Look at your providers website and activate his spam protection.
    4. Talk to your provider and ask him about his possibilities.
    5. Insert your own eMail-address only as a jpg-file (image-file)
    6. Replace the @ with a written "at"
    7. and more ... you could even look to Google.
    Good luck!
    Hans-Guenter
    P.S.
    Answer should be directed to "Jim Brasil".

Maybe you are looking for

  • Adding data dynamically to JTable with a filter - getting error

    Hello, I am using JTable, and adding data and displaying it worked fine until I tried adding a filter, can anyone tell me what am I doing wrong or why am I getting this Error? The Error message Exception in thread "AWT-EventQueue-0" java.lang.NullPoi

  • How do I import video from my dvd drive?

    I made a video in an older version of iMovie sometime ago. I would now like to import that video again into iMovie to update it. I cannot figure out how to add the clips to my events from the DVD drive. I can't believe there is not a simple way to do

  • T42 resolution - set to 1400x1050 without panning.

    I have a need to set my resolution to 1400x1050, so i installed the driver updates http://www-307.ibm.com/pc/support/site.wss/MIGR-41918.html which talks about the feature given below: (New) The external monitor resolution can be set to 1400x1050 wit

  • How do i force restart my iphone

    Hi all, Just wondering if anyone can tell me how to "force restart" my iphone. I have recently had my iphone exhanged at a store and everytime I connect to itunes it asks for a pasword. however there is no password set on the phone and nor is there a

  • Sales order created in past went in to credit blocked

    Hi, I created a sales order last month it went in to credit blocked . And realeased also. After that many orders have been created and many time payment also have been revieved Can I check the credit position of that day when I created the order to k