login about faq

And I need save Attachment with my custon name! Have any way to do this, for sample:

std::string my_dir = "/temp/mydir";
std::string my_new_file_name = "my_new_artifical_name.xml";
if (email->SaveAttachedFile(j, (my_dir + "/" + my_new_file_name).c_str()) != true) 

asked Dec 13 '12 at 14:25

chilkat's gravatar image

chilkat ♦♦

You would call the email->SetAttachmentFilename method to set the Nth attachment's filename. For example:


Then call SaveAttachedFile as before. The 2nd argument to SaveAttachedFile is the target directory (without the filename).


answered Dec 13 '12 at 14:27

chilkat's gravatar image

chilkat ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Dec 13 '12 at 14:25

Seen: 1,893 times

Last updated: Dec 13 '12 at 14:27

powered by OSQA