A man who messaged his former partner despite being banned from contacting her due to previous harassment has been remanded in custody.