openSUSE Forums > Archives > Novell Archives » Command to email a file

Go Back   openSUSE Forums > Archives > Novell Archives
Forums FAQ Members List Search Today's Posts Mark Forums Read


Novell Archives Archived content from Novell openSUSE support forums

 
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-Oct-2005, 13:52
Angus Comber
Guest
 
Posts: n/a
Default Command to email a file

Hello

On SUZE is there a command to attach a file and email to someone. eg using
sendmail?

Angus


  #2 (permalink)  
Old 05-Oct-2005, 15:46
novell-numpty@mailtrap.org.uk
Guest
 
Posts: n/a
Default Re: Command to email a file

Angus Comber wrote:

> Hello
>
> On SUZE is there a command to attach a file and email to someone. eg
> using sendmail?


man mail
  #3 (permalink)  
Old 06-Oct-2005, 12:38
Angus Comber
Guest
 
Posts: n/a
Default Re: Command to email a file

Thanks.

I had a go and have used this for example:

mail myself@somedomain.com -s MySubject -a attachedfile

That works but it prompts you to enter a body text etc. How can I write the
line without having to then interactively enter body text. I will be
calling this from a batch program.

Angus


<novell-numpty@mailtrap.org.uk> wrote in message
news:qYW0f.2721$GG4.1875@prv-forum2.provo.novell.com...
> Angus Comber wrote:
>
>> Hello
>>
>> On SUZE is there a command to attach a file and email to someone. eg
>> using sendmail?

>
> man mail



  #4 (permalink)  
Old 06-Oct-2005, 14:52
novell-numpty@mailtrap.org.uk
Guest
 
Posts: n/a
Default Re: Command to email a file

Angus Comber wrote:

> Thanks.
>
> I had a go and have used this for example:
>
> mail myself@somedomain.com -s MySubject -a attachedfile
>
> That works but it prompts you to enter a body text etc. How can I
> write the
> line without having to then interactively enter body text. I will be
> calling this from a batch program.


Please do not top post.

You may want to use a "here" document. "man bash" and look for
"redirection".

As a quick guide though....

mail wibble@wobble <<%%
data
data
%%

Or to redirect a file...

mail wibble@wobble < /path/to/file


> <novell-numpty@mailtrap.org.uk> wrote in message
> news:qYW0f.2721$GG4.1875@prv-forum2.provo.novell.com...
>> Angus Comber wrote:
>>
>>> Hello
>>>
>>> On SUZE is there a command to attach a file and email to someone.
>>> eg using sendmail?

>>
>> man mail


 

Bookmarks


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2