Welcome to YLOAN.COM
yloan.com » Email-Marketing » 10 Steps to Configure Email - Websphere Commerce Server
Online Business Site Promotion Web misc Affiliate-Revenue Auctions Audio-Streaming Autoresponders Blogging-Rss Email-Marketing Ezine-Publishing Forums Internet-Marketing List-Building PPC-Advertising Podcasting SEO Spam-Blocker Traffic-Building Video-Streaming Web-Design Web-Development Web-Hosting Domain Name soreness web analysis vinyl mlm searching media info spyware access microsoft outlook farmville

10 Steps to Configure Email - Websphere Commerce Server

10 Steps to Configure Email - Websphere Commerce Server


Websphere Commerce Server - Configure Email

Follow 10 steps for configuring email in Websphere Commerce Server

Step 1: Create a JSP ( eg:- AbcEmailNotify.jsp)


Create a JSP, lets name it AbcEmailNotify.jsp

AbcEmailNotify.jsp will be used for displaying contents of email to recipient.

Note: Currently keep AbcEmailNotify.jsp as blank (without any code)

Step 2: Create View ( eg- AbcEmailNotifyView)

Make an Entry in Struts-Config.xml file for AbcEmailNotify.jsp as below

< action path='/AbcEmailNotifyView' type='com.ibm.commerce.struts.BaseAction'>

< set-property property ='authenticate' value ='10101:1'/>

< set-property property ='https' value ='10101:1'/>

< /action>

< forward name="AbcEmailNotifyView /10101/-3" path="/< location of JSP file >/AbcEmailNotify.jsp" className="com.ibm.commerce.struts.ECActionForward">

< set-property property="implClassName" value="com.ibm.commerce.messaging.viewcommands.MessagingViewCommandImpl"/>

< set-property property="interfaceName" value="com.ibm.commerce.messaging.viewcommands.MessagingViewCommand"/>

< /forward>

Step 3: Entry ViewName (AbcEmailNotifyView) in MSGTYPE table

Execute below SQL

INSERT INTO MSGTYPES(MSGTYPE_ID , MSGTDIR , NAME , VIEWNAME, DESCRIPTION)

VALUES((SELECT MAX(MSGTYPE_ID)+1) FROM MSGTYPE) , 1, '< Name of MSG>', '< View Name of JSP>', '')

Example

INSERT INTO MSGTYPES(MSGTYPE_ID , MSGTDIR , NAME , VIEWNAME, DESCRIPTION)

VALUES((SELECT MAX(MSGTYPE_ID)+1) FROM MSGTYPE) , 1, 'AbcEmailNotify', ''AbcEmailNotifyView', Testing Email ')

Step 4: Create ACPLoad file for AbcEmailNotifyView

< Policies>

< Action Name="AbcEmailNotifyView" CommandName="AbcEmailNotifyView">

< /Action>

< ActionGroup Name="AllSiteUsersViews" OwnerID="RootOrganization">

< ActionGroupAction Name="AbcEmailNotifyView"/>

< /Policies>

Step 5: Run ACPLaod for AbcEmailNotifyView

Step 6: Configure Email Transport Type

Open WCS Administrative Console

Site -> Configuration -> Transport

select "Email"

Click Active (if it is inactive)

Now again select Email

Click on Configure

Enter Host ( Contact admin team )

Enter protocol (by default smtp, leave as it is)

Enter port ( by default 25, leave as it is)

Click "Ok"

Step 7: Entry in PROFILE Table

Open WCS Administrative Console

Site -> Configuration -> Message Type ->New

Select Message Type from Drop Down (Display entries of MSGTYPE table )

Transport Type - Email ( from Drop Down)

Device Format --- Standard Device Format

Click Next

Finish

Note:- This will do an entry in PROFILE table corresponding to MSGTYPE_ID which we entered in MSGTYPE table.

Step 8: Create a method to send email

public void sendEmail() throws ECException {

SendMsgCmd sendMsgCmd;

try {

sendMsgCmd = (SendMsgCmd) CommandFactory.createCommand(SendMsgCmd.NAME, getCommandContext().getStoreId());

//'AbcEmailNotify' entry in MSGTYPE table

sendMsgCmd.setMsgType("AbcEmailNotify");

sendMsgCmd.setStoreID(getCommandContext().getStoreId());

sendMsgCmd.setCommandContext(getCommandContext());

sendMsgCmd.setConfigData("subject", "This is test email");

//abc@abc.com email to whom you want to send email

sendMsgCmd.setConfigData("recipient", "abc@abc.com");

sendMsgCmd.setConfigData("contentType", "text/html");

//Set parameter which you want todisplay recipient

final TypedProperty property = new TypedProperty();

property.put("FirstName","Shailendra");

property.put("LastName","Mishra");

property.put("Address","Shahdol");

sendMsgCmd.compose("AbcEmailNotifyView", getCommandContext(), property);

sendMsgCmd.sendImmediate();

sendMsgCmd.execute();

} catch (Exception exception) {}

}

Step 9 : Call sendEmail() method for sending email

Call sendEmail() for triggering email, this method can be called at any place of your controller command whereever you want to send email.

Example:- Let say if you want to trigger a email to user who has place an order. Please see code sample for same

Class ExOrderProcessCmdImpl extends OrderProcessCmdImpl{

Public void performExecute(){

Super.performExecute();

sendEmail();

}

}

Note: - In this case sendEmail() method should defined in ExOrderProcessCmdImpl. In other words, method sendEmail() mentioned above in step 8 should present in class ExOrderProcessCmdImpl

Step 10: Content of AbcEmailNotify.jsp


Modify your AbcEmailNotify.jsp as per you requirement and template, otherwise email will be sent to customer without any body/content, but subject line will be there which you have written in step 8.

sendMsgCmd.setConfigData("subject", "This is test email");

In case if you are facing any problem, send an email at shail.mishra1980@gmail.com, will try to resolve issue.

BEST OF LUCK
Why You Need a Miniature Fortress For Your Mail 9 Steps to Executing an E Mail Campaign Top 3 Email List Building Strategies It&#039;s that Can&#039;t Live with Gmail ? Email Marketing - A Brief Idea Why Twitter is Better Than Email My IT Group Spends Too Much Time Managing E-mail Using Blind Carbon Copy (BCC) For Email Privacy Creating Email Newsletters - Subject Does Matter, But You Matter More Do You Need To Receive Faxes When You&#039;re Away From The Office? Try Fax To Email Powerful and Advanced Email Promoting Methods 5 Simple IT Support Strategies That Will Stop Your Email Becoming A Time Vampire Email List Building Secrets
print
www.yloan.com guest:  register | login | search IP(216.73.216.114) California / Anaheim Processed in 0.043232 second(s), 7 queries , Gzip enabled , discuz 5.5 through PHP 8.3.9 , debug code: 178 , 5458, 229,
10 Steps to Configure Email - Websphere Commerce Server Anaheim