問題タブ [mime-message]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
java - メールアドレスの有無を確認する方法は?
com.sun.mail.smtp.SMTPTransportを使用してJava経由でメールを送信しています。
メールの送信に成功しましたが、無効なメールアドレスにメールを送信してもSMTPTransportはエラーを出しません。
指定されたメールアドレスが存在するかどうかを確認する方法はありますか?
クライアント側でメールアドレスを確認するつもりはありません。サーバー側で確認する必要があります。
多くのフォーラムでこのような質問をたくさん見つけましたが、適切な解決策が得られていません。
私のコードは-
有効なemail_addressと無効なemail_addressの両方の出力を提供します: -250 OK id = 1TbWgN-0007oY-8r
問題を解決するのを手伝ってください。前もって感謝します。
java - Xstreamを使用してXmlDeserilizationが機能しない
シリアル化されている次のクラスがあります
org.springframework.integration.core.Message
次のようにファイルに:
Sample.java
UnMarshall.java
UnMarshall.javaを実行すると、次の例外が発生します。
質問
- XStreamを使用してMessageオブジェクトをシリアル化/逆シリアル化することは可能ですか?
そうでない場合、私には他にどのようなオプションがありますか?
スレッド"main"の例外com.thoughtworks.xstream.converters.ConversionException:クラスjava.lang.Classを構築できません----デバッグ情報----メッセージ:クラスjava.lang.Classを構築できません原因-例外:java。 lang.InstantiationException原因メッセージ:javax.activation.ActivationDataFlavorクラス:org.springframework.integration.message.GenericMessage必須-タイプ:javax.activation.ActivationDataFlavorパス:/org.springframework.integration.message.GenericMessage/payload/dh/dataContentHandler / dch / myDF行番号:14-------------------------------com.thoughtworks.xstream.converters.reflectionにあります。 com.thoughtworks.xstream.coreのExternalizableConverter.unmarshal(ExternalizableConverter.java:110)。TreeUnmarshaller.convert(TreeUnmarshaller.java:56)at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:45)at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:46)at com .thoughtworks.xstream.annotations.AnnotationReflectionConverter.unmarshallField(AnnotationReflectionConverter.java:66)at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:188)at com.thoughtworks.xstream .unmarshal(AbstractReflectionConverter.java:125)at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:56)atcom.thoughtworks.xstream.core.AbstractReferenceUnmarshaller。convert(AbstractReferenceUnmarshaller.java:45)at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:46)at com.thoughtworks.xstream.annotations.AnnotationReflectionConverter.unmarshallField(AnnotationReflectionConverter.java:66)at com .xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:188)at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:125)at com.thoughtworks.xstream.core.Tree (TreeUnmarshaller.java:56)at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:45)at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:46)com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:188)のcom.thoughtworks.xstream.annotations.AnnotationReflectionConverter.unmarshallField(AnnotationReflectionConverter.java:66)のcom.thoughtworks .reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:125)at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:56)at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshall )com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:46)at com.thoughtworks.xstream.annotations.AnnotationReflectionConverter.unmarshallField(AnnotationReflectionConverter.java:66)com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:125)at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:188)at com.thoughtworks .core.TreeUnmarshaller.convert(TreeUnmarshaller.java:56)at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:45)at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:46 )com.thoughtworks.xstream.annotations.AnnotationReflectionConverter.unmarshallField(AnnotationReflectionConverter.java:66)at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:188)com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:125)at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:56)at com.thoughtworks.xstream.core .AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:45)at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:46)at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:117)at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:846)at com.thoughtworks.xstream.XStream.unmarshal(XStream.java: 833)com.thoughtworks.xstream.XStreamで。fromXML(XStream.java:789)at org.springframework.integration.samples.mail.imapidle.DefaultEmailReceiverUtilService.main(DefaultEmailReceiverUtilService.java:103)原因:java.lang.InstantiationException:javax.activity.ActivationDataFlavoratjava.lang。 Class.newInstance0(Class.java:340)at java.lang.Class.newInstance(Class.java:308)at com.thoughtworks.xstream.converters.reflection.ExternalizableConverter.unmarshal(ExternalizableConverter.java:80)... 39もっとnewInstance(Class.java:308)at com.thoughtworks.xstream.converters.reflection.ExternalizableConverter.unmarshal(ExternalizableConverter.java:80)... 39 morenewInstance(Class.java:308)at com.thoughtworks.xstream.converters.reflection.ExternalizableConverter.unmarshal(ExternalizableConverter.java:80)... 39 more
java - Spring 3 MVC:Javamimemessageメールをhtmlとして表示
私はいくつか検索を行い、Javaで電子メールを送信する方法についての良い投稿をたくさん見つけることができましたが、それらを表示するための良い出発点を見つけることができませんでした。これが取引です。私のSpring3Webアプリはちょうどタイプのオブジェクトを受け取りました。
(より正確には、送信するために読み取られるものを作成しただけです。)
そのメッセージのプレビューをHTMLで表示するにはどうすればよいですか?そこに入れられるすべてのものを追跡できることは知っていますが、私の手の届かないところに組み込まれているヘッダーとフッター、署名などのコンポーネントがあります。
java - JavaMail - 本文テキストを取得すると、最初の部分で null が返される
メッセージの複数BodyPart
の の内容を文字列に再帰的に追加するメソッドを作成しました。Multipart
理由はわかりませんが、文字列の最初のフレーズはnull
- なぜ?
コード:
出力:
java - javamail - メッセージ本文コンテンツのフォーマット エラーの取得
電子メールからメッセージ本文のテキストを取得しようとすると、半分の文と奇妙な書式で出てきます。どんな助けでも素晴らしいでしょう...
コード:
出力:
The gist of PNM's protest in RP00-626 is that we shouldn't be able to
charge a transport or fuel fee for our imbalance netting and trading
service.
I aggress with PNM that our tariff language is
vague.
lotus-notes - 添付画像を含む MIME ボディが SSO 環境でパスワードを要求する
アプリケーションは、メモを MIME 形式で Notes ユーザーに送信します。コンテンツは、バックグラウンド エージェントの RT Body フィールドの HTML レンダリングから生成されます。本文にはタイプ .LOG の添付ファイルが含まれています。添付画像は、ユーザー (元のドキュメントを変更したユーザー) の環境、この場合はメモ帳アイコンに基づくファイルタイプに関連付けられた画像を使用します。添付画像の IMG ソースは、SPNEGO SSO 認証を使用するように構成された Domino サーバーに送られます (エージェントはそのサーバーで Body をレンダリングします)。
ユーザーがノーツ クライアントでメールを開くと、画像が表示されず、ユーザーは資格情報の入力を求められます。何度か試行した後、失敗し、画像が表示されません。ただし、ユーザーがメモを開く直前に IE ブラウザーで Web サイトを開いた場合、資格情報は必要なく、画像は問題なく表示されます。
Notes クライアントの内部ブラウザは、サーバーとの SSO セッションをネゴシエート/初期化できないようです。
この問題を解決するにはどうすればよいですか?
java - MimeMessage Java で電子メールからユーザー署名を削除する方法
一部のユーザーの返信に対してgmailの受信トレイを処理し、これらの返信を処理してデータベースに入れるJavaアプリケーションを使用しています。現在、電子メール コンテンツ内のユーザー署名を特定し、それらを切り取り、残りのコンテンツをデータベースに保存するという問題に直面しています。
メールを MimeMessage に読み込んで、そこからコンテンツを取得して処理しています。
MimeMessage コンテンツまたはヘッダーから署名を削除して、電子メールにユーザー署名と開始位置の境界があることを示す方法はありますか?
私はそれをグーグルで調べましたが、これについては何も見つかりませんでした。どんな助けでも大歓迎です!ありがとう :)