當前位置: 首頁>>代碼示例>>Java>>正文


Java MailService類代碼示例

本文整理匯總了Java中org.exoplatform.services.mail.MailService的典型用法代碼示例。如果您正苦於以下問題:Java MailService類的具體用法?Java MailService怎麽用?Java MailService使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


MailService類屬於org.exoplatform.services.mail包,在下文中一共展示了MailService類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: sendRequestReceiveMail

import org.exoplatform.services.mail.MailService; //導入依賴的package包/類
/**
 * 
 */
public static void sendRequestReceiveMail(String receiver, String fromEmail, String hostName)
		throws Exception {

	MailService mailService = WCMCoreUtils.getService(MailService.class);
	
	Message message = new Message();
	message.setTo(receiver);
	
	message.setFrom("eXo Resource Center" + "<" +fromEmail + ">");
	String bodyMessage = "<br> Thank you for submitting your add-on." + "<br>"
			             + "<br>"
	                     +  "=========================" + "<br>"
	     				 + hostName;
	
	message.setBody(bodyMessage);
	message.setMimeType("text/html");
	message.setSubject("Thank you for submitting your Add-on");
	mailService.sendMessage(message);

}
 
開發者ID:exo-addons,項目名稱:marketplace-extension,代碼行數:24,代碼來源:AddOnService.java

示例2: EmailService

import org.exoplatform.services.mail.MailService; //導入依賴的package包/類
public  EmailService(IdentityManager identityManager,MailService mailService){

    this.identityManager = identityManager;
    this.exoMailService = mailService;
    this.remoteUrl = System.getProperty("exo.base.url");
    if(null == remoteUrl || "".equals(remoteUrl)){
      remoteUrl = "http://community.exoplatform.com";
    }
    this.setDNS("localhost");
    if(null != System.getProperty("exo.notification.portalname"))
      this.setDNS(System.getProperty("exo.notification.portalname"));
  }
 
開發者ID:exo-addons,項目名稱:invite-friend,代碼行數:13,代碼來源:EmailService.java

示例3: sendCustomers

import org.exoplatform.services.mail.MailService; //導入依賴的package包/類
public void sendCustomers() {
  Message message = new Message();
  message.setSubject(subject);
  message.setBody(body);
  message.setFrom(userBean.getUserEmail());
  message.setTo(customerMailList.getMailList());
  
  try {
    ((MailService) CommonsUtils.getService(MailService.class)).sendMessage(message);
  } catch (Exception e) {
    e.printStackTrace();
  }
}
 
開發者ID:exo-samples,項目名稱:docs-samples,代碼行數:14,代碼來源:MailSender.java

示例4: sendPartners

import org.exoplatform.services.mail.MailService; //導入依賴的package包/類
public void sendPartners() {
  Message message = new Message();
  message.setSubject(subject);
  message.setBody(body);
  message.setFrom(userBean.getUserEmail());
  message.setTo(partnerMailList.getMailList());
  
  try {
    ((MailService) CommonsUtils.getService(MailService.class)).sendMessage(message);
  } catch (Exception e) {
    e.printStackTrace();
  }
}
 
開發者ID:exo-samples,項目名稱:docs-samples,代碼行數:14,代碼來源:MailSender.java

示例5: SendConfirmationAddonPublishedEmail

import org.exoplatform.services.mail.MailService; //導入依賴的package包/類
public static void SendConfirmationAddonPublishedEmail(String receiver,String nodeName, String hostName) throws Exception{
	
	String fromEmail = Utils.getPortletPreference(PREFERENCE_FROM);
	String fromName = Utils.getPortletPreference(PREFERENCE_FROM_NAME);
	String itemPath = Utils.getPortletPreference(PREFERENCE_ITEM_PATH);
	String[] strs = itemPath.split("/");
    String folder = strs[strs.length-2];
    
	MailService mailService = WCMCoreUtils.getService(MailService.class);
	Message message = new Message();
	String link = hostName + "/portal/intranet/addon-detail?content-id=/repository/collaboration/sites/intranet/web contents/Contributions/" + nodeName;
	message.setTo(receiver);
	message.setFrom(fromName + "<" +fromEmail + ">");
	String bodymess = "Thank your for contributing to the eXo Add-ons, your add-on has been validated and published." + "<br>"
			          +   "Please access you add-on here: " + "<a href='link' >" + link + "</a>" +  "<br><br>"
			          +   "=========================" + "<br>"
	     			    + hostName;
	message.setBody(bodymess);
	message.setMimeType("text/html");
	message.setSubject("Your Add-on has been validated and published on " + hostName);


	mailService.sendMessage(message);

	
	
}
 
開發者ID:exo-addons,項目名稱:marketplace-extension,代碼行數:28,代碼來源:AddOnService.java

示例6: sendNewAddonSubmisson

import org.exoplatform.services.mail.MailService; //導入依賴的package包/類
public static void sendNewAddonSubmisson(String receiver, String fromEmail, String subject,
		                                     String email,  String titleAddon, String description,
		                                     String version,String license, String author,
		                                     String compatibility,String  sourceUrl,
		                                     String documentUrl ,String downloadUrl , String codeUrl,
		                                     String demoUrl, String installCommand, Boolean hosted,
		                                     String hostName)
		throws Exception {

	MailService mailService = WCMCoreUtils.getService(MailService.class);
    

	Message message = new Message();
	message.setTo(receiver);
	message.setFrom("eXo Resource Center" + "<" +fromEmail + ">");
	
	String _version = version!= null ? "Version: " +  version : "Version: ";
	String _license = license!= null ? "License: " +  license : "License: ";
	
	String _author = author!= null ? "Author: " +  author : "Author: ";
	String _compatibility = compatibility!= null ? "Compatibility: " +  compatibility : "Compatibility: ";
	
	String _sourceUrl = sourceUrl!= null ? "Source Code: " +  sourceUrl : "Source Code: ";
	String _documentUrl= documentUrl!= null ? "Documentation: " +  documentUrl : "Documentation: ";
	String _downloadUrl= downloadUrl!= null ? "Download: " +  downloadUrl : "Download: ";
	
	String _codeUrl= codeUrl!= null ? "Code URL: " +  codeUrl : "Code URL: ";
	String _demoUrl= demoUrl!= null ? "Demo URL: " +  demoUrl : "Demo URL: ";
	String _installCommand= installCommand!= null ? "Install command: " +  installCommand : "Install command: ";
	
	String _hosted= hosted ? "I wish my add-on to be hosted on the eXo Add-on repository on Github: Yes" : "I wish my add-on to be hosted on the eXo Add-on repository on Github: No";
	String bodyMessage = "The following add-on is submitted on " + hostName + "<br><br>"
			
			+ "Add-on Name: " + titleAddon + "<br><br>"
			+ "Description: " + description + "<br><br>"
			+ _version + "<br><br>"
               + _license + "<br><br>"
               + _compatibility + "<br><br>"
               + _sourceUrl + "<br><br>"
               + _documentUrl + "<br><br>"
			+ _downloadUrl + "<br><br>"
       + _codeUrl + "<br><br>"
       + _demoUrl + "<br><br>"
       + _installCommand + "<br><br>"
			+ _hosted + "<br><br>"
			+ _author + "<br><br>"
			+ "Email (for internal use only): " + email + "<br><br>"
			+ "Please login to the website back-end to validate or refuse the add-on. (go to \"Web contents\" folder > \"Contributions\" folder, add categories and publish. " + "<br><br>"
		    + "=========================" + "<br>"
			+ hostName;
	
	message.setBody(bodyMessage);
	message.setMimeType("text/html");
	message.setSubject(subject);
	mailService.sendMessage(message);

}
 
開發者ID:exo-addons,項目名稱:marketplace-extension,代碼行數:58,代碼來源:AddOnService.java


注:本文中的org.exoplatform.services.mail.MailService類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。