email - Java mail - Retrieve links url from a javax.mail.Message which is a multipart -


let's have email mimemultipart, , contains 1 or more links. @ point got javax.mail.message, , able plain text.

private static string parsecontent(message m) throws exception  {      object content = m.getcontent();     string contentreturn = null;      if (content instanceof string) {         contentreturn = (string) content;     } else if (content instanceof multipart) {         multipart multipart = (multipart) content;         bodypart part = multipart.getbodypart(0);         contentreturn = part.getcontent().tostring();      }        return contentreturn; } 

is possible (maybe "get methode" ignore on message object, or maybe using javascript) retrieve url of links?


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -