Results 1 to 2 of 2

Thread: Command line compose an e-mail with attachment and save in drafts

  1. #1
    Creiger is offline Starter Member
    Join Date
    Jan 2013
    Posts
    1
    Rep Power
    2

    Default Command line compose an e-mail with attachment and save in drafts

    Hello,

    i am building an application (in c++) which is supposed to take params (Subject,From,To,Content,Attachment path) from 3rd party app, compose an email and then save it to Drafts under particular account. I dont know what tools should i use for it exactly. I can connect to zimbra through ssh socket and execute commands. I can upload a file to server using sftp. I have found some usefull commands like addmessage or /postfix/sendmail. But i dont know how compose a new message and connect an attachment to it in command line.

    Should i approach to this app in other way?

    Thank for any advice.

  2. #2
    liverpoolfcfan's Avatar
    liverpoolfcfan is online now Outstanding Member
    Join Date
    Oct 2009
    Location
    Dublin, IRELAND
    Posts
    698
    Rep Power
    6

    Default

    Your best bet is probably to create a MIME message - I'm sure C++ will have tools to do that - and then to use the File Upload Servlet to upload it to zimbra. You can then use a SaveDraftRequest SOAP request to save the uploaded message to the account.

    The zimbrabackend for z-push operates in a similar manner for sending emails. It uploads and then Sends - You just need to upload and save.

    If you can read php code - download a copy of the backend (Z-Push Zimbra Backend | Free software downloads at SourceForge.net) and read through it. Look for the Login an SendMail functions in particular.

    Login retrieves the preauth token, then SendMail does the Upload, followed by the SOAP command to send.

    You can find details of the upload servlet and soap messages in the /opt/zimbra/docs folder on your server.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Sending mail from the command line
    By glennbtn in forum Administrators
    Replies: 7
    Last Post: 02-21-2013, 11:48 AM
  2. delete old mail son command line
    By rpanis in forum Administrators
    Replies: 0
    Last Post: 06-16-2009, 06:28 AM
  3. [SOLVED] mail in command line
    By petricag in forum Administrators
    Replies: 8
    Last Post: 04-24-2009, 11:35 AM
  4. Local internal mail failing (PHP, command line mail)
    By fireman949 in forum Administrators
    Replies: 1
    Last Post: 01-17-2008, 03:01 PM
  5. Mail forwarding via command line
    By NIRMESH KUMAR in forum Administrators
    Replies: 2
    Last Post: 01-24-2007, 03:19 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •