mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 18:19:22 +03:00
Added export contacts (vCard)
This commit is contained in:
parent
c25b5bfef7
commit
c248292f07
37 changed files with 489 additions and 237 deletions
|
|
@ -6116,6 +6116,42 @@ class Actions
|
|||
return $this->rawSmart(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function RawContactsVcf()
|
||||
{
|
||||
$oAccount = $this->getAccountFromToken();
|
||||
|
||||
\header('Content-Type: text/directory; charset=UTF-8');
|
||||
\header('Content-Disposition: attachment; filename="contacts.vcf"', true);
|
||||
\header('Accept-Ranges: none', true);
|
||||
\header('Content-Transfer-Encoding: binary');
|
||||
|
||||
$this->oHttp->ServerNoCache();
|
||||
|
||||
return $this->AddressBookProvider($oAccount)->IsActive() ?
|
||||
$this->AddressBookProvider($oAccount)->Export($oAccount->ParentEmailHelper(), 'vcf') : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function RawContactsCsv()
|
||||
{
|
||||
$oAccount = $this->getAccountFromToken();
|
||||
|
||||
\header('Content-Type: ext/csv; charset=UTF-8');
|
||||
\header('Content-Disposition: attachment; filename="contacts.csv"', true);
|
||||
\header('Accept-Ranges: none', true);
|
||||
\header('Content-Transfer-Encoding: binary');
|
||||
|
||||
$this->oHttp->ServerNoCache();
|
||||
|
||||
return $this->AddressBookProvider($oAccount)->IsActive() ?
|
||||
$this->AddressBookProvider($oAccount)->Export($oAccount->ParentEmailHelper(), 'csv') : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue