A man accused of sending "grossly offensive" material was cleared when evidence emerged at the last minute.