roundcubemail/plugins/vcard_attachments/vcard_attachments.php
public function attach_vcard($args)
    {
        if (preg_match('|^vcard://(.+)$|', $args['uri'], $m)) {
            list($cid, $source) = explode('-', $m[1]);

            $vcard  = $this->get_contact_vcard($source, $cid, $filename);
            $params = array(
                'filename' => $filename,
                'mimetype' => 'text/vcard',
            );

            if ($vcard) {
                $args['attachment'] = rcmail_save_attachment($vcard, null, $args['compose_id'], $params);
            }
        }

        return $args;
    }
public function attach_vcard($args)
    {
        if (preg_match('|^vcard://(.+)$|', $args['uri'], $m)) {
            list($cid, $source) = explode('-', $m[1]);

            $vcard  = $this->get_contact_vcard($source, $cid, $filename);
            $params = array(
                'filename' => $filename,
                'mimetype' => 'text/vcard',
            );

            if ($vcard) {
                $args['attachment'] = rcmail_save_attachment($vcard, null, $args['compose_id'], $params);
            }
        }

        return $args;
    }
public function attach_vcard ( $ args ) { if ( preg_match ( '|^vcard://(.+)$|' , $ args [ 'uri' ] , $ m ) ) { list ( $ cid , $ source ) = explode ( '-' , $ m [ 1 ] ) ; $ vcard = $ this -> get_contact_vcard ( $ source , $ cid , $ filename ) ; $ params = array ( 'filename' => $ filename , 'mimetype' => 'text/vcard' , ) ; if ( $ vcard ) { $ args [ 'attachment' ] = rcmail_save_attachment ( $ vcard , null , $ args [ 'compose_id' ] , $ params ) ; } } return $ args ; }
Attaches a contact vcard to composed mail
Attaches a contact vcard to composed mail