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 ♦♦
11.8k316358420


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

email->SetAttachmentFilename(j,"my_new_artifical_name.xml");

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

link

answered Dec 13 '12 at 14:27

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

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

Tags:

×184
×22
×7

Asked: Dec 13 '12 at 14:25

Seen: 1,025 times

Last updated: Dec 13 '12 at 14:27

powered by OSQA