Logo Search packages:      
Sourcecode: pwlib version File versions

void PRFC822Channel::SetContentAttachment ( const PFilePath filename  ) 

Set the content disposition for attachments. This must be called before any writes are done to the channel. It may be set again immediately after any call to NextPart() when multipart mime is being used.

Note that this will alter the Content-Type field to

filename  Attachment filename

Definition at line 1550 of file inetmail.cxx.

References PFilePath::GetFileName(), PFilePath::GetType(), and SetHeaderField().

  PString name = file.GetFileName();
  SetHeaderField(ContentDispositionTag, "attachment; filename=\"" + name + '"');
                 PMIMEInfo::GetContentType(file.GetType())+"; name=\"" + name + '"');

Generated by  Doxygen 1.6.0   Back to index