iCal MAILTO exporting

Home Forums Calendar Products Events Calendar PRO iCal MAILTO exporting

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #999232
    Tim Parker
    Participant

    Hello:

    When I validate my iCal feed, e-mails are formatted as “MAILTO: [email protected].” The mailto is being pulled into our app. How do I get rid of this?

    #999371
    Barry
    Member

    Hi Tim,

    I’m sorry you have hit up against difficulties.

    My understanding is that the “MAILTO:” component is required or at least recommended within RFC 5545 (the formal specification for iCal). Just to clarify, is the problem here due to the single space separation between “MAILTO:” and the actual email address, or is that just a copy and paste error in your initial reply?

    If you’re certain you want to be rid of “MAILTO:” in that field completely, you could add this code to your functions.php file or some other suitable location:

    function ical_remove_mailto_component( array $ical_item ) {
    	foreach ( $ical_item as &$part )
    		$part = str_replace( 'MAILTO:', '', $part );
    
    	return $ical_item;
    }
    
    add_filter( 'tribe_ical_feed_item', 'ical_remove_mailto_component' );

    However, I’d add a caveat that this itself may lead to invalid iCal.

    #1003646
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘iCal MAILTO exporting’ is closed to new replies.