/** * Embeds a file in the HTML. This implementation delegates to * {@link #embed(File, String)}. * * @param file The <code>File</code> object to embed * @return A String with the Content-ID of the file. * @throws EmailException when the supplied <code>File</code> cannot be * used; also see {@link javax.mail.internet.MimeBodyPart} for definitions * * @see #embed(File, String) * @since 1.1 */ public String embed(final File file) throws EmailException { final String cid = EmailUtils.randomAlphabetic(HtmlEmail.CID_LENGTH).toLowerCase(Locale.ENGLISH); return embed(file, cid); }
final String cid = EmailUtils.randomAlphabetic(HtmlEmail.CID_LENGTH).toLowerCase(); return embed(dataSource, name, cid);
/** * Embeds a file in the HTML. This implementation delegates to * {@link #embed(File, String)}. * * @param file The <code>File</code> object to embed * @return A String with the Content-ID of the file. * @throws EmailException when the supplied <code>File</code> cannot be * used; also see {@link javax.mail.internet.MimeBodyPart} for definitions * * @see #embed(File, String) * @since 1.1 */ public String embed(final File file) throws EmailException { final String cid = EmailUtils.randomAlphabetic(HtmlEmail.CID_LENGTH).toLowerCase(Locale.ENGLISH); return embed(file, cid); }
final String cid = EmailUtils.randomAlphabetic(HtmlEmail.CID_LENGTH).toLowerCase(); return embed(dataSource, name, cid);