//
// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
//
// MSG-EMAIL-CR657_0002_CreateSendReceivePop3Email.script
//
//! @file
//! @SYMTestCaseID MSG-EMAIL-CR657_0002
//! @SYMTestType CIT
//! @SYMTestPriority Critical
//! @SYMDEF CR657
//! @SYMTestCaseDesc Send Email with a different Reply-To address in the header than in the default account settings.
//! @SYMTestActions
//! Set different Reply-To field from settings in sample email.
//! Create, send and retrieve the email.
//! Check Reply-To field of received email to see if it matches the one set via a Reply-To field in the header of sent email.
//! @SYMTestExpectedResults Reply-To field of sent email matches the Reply-To field of the received email.

RUN_UTILS DeleteFile c:\messaging.db
LOAD_SUITE MessagingTestServer -SharedData

// Running NT Ras configuration file
// CED c:\msgtest\TestFramework\Configurations\CommDbSettings\NtRasLongIdleTimeout.cfg

// Running Ethernet configuration file
ced -i c:\auto.cfg
RUN_TEST_STEP 100 MessagingTestServer BEGIN_TEST_CASE

RUN_TEST_STEP 100 MessagingTestServer SETUP_TEST_CASE
RUN_TEST_STEP 100 MessagingTestServer GetBaseConstants			c:\msgtest\TestFramework\ScriptedTestCases\CR657\MSG-EMAIL-CR657_0002_CreateSendReceivePop3Email.ini GetBaseConstants
RUN_TEST_STEP 100 MessagingTestServer InitNtRas					c:\msgtest\TestFramework\ScriptedTestCases\CR657\MSG-EMAIL-CR657_0002_CreateSendReceivePop3Email.ini InitNtRas
RUN_TEST_STEP 100 MessagingTestServer CreateSession				c:\msgtest\TestFramework\ScriptedTestCases\CR657\MSG-EMAIL-CR657_0002_CreateSendReceivePop3Email.ini CreateSession
RUN_TEST_STEP 100 MessagingTestServer ResetMessageStore			c:\msgtest\TestFramework\ScriptedTestCases\CR657\MSG-EMAIL-CR657_0002_CreateSendReceivePop3Email.ini ResetMessageStore

RUN_TEST_STEP 100 MessagingTestServer CreatePop3Service			c:\msgtest\TestFramework\ScriptedTestCases\CR657\MSG-EMAIL-CR657_0002_CreateSendReceivePop3Email.ini CreatePop3Service
RUN_TEST_STEP 100 MessagingTestServer CreateSmtpService			c:\msgtest\TestFramework\ScriptedTestCases\CR657\MSG-EMAIL-CR657_0002_CreateSendReceivePop3Email.ini CreateSmtpService

RUN_TEST_STEP 100 MessagingTestServer CreateRegistry				c:\msgtest\TestFramework\ScriptedTestCases\CR657\MSG-EMAIL-CR657_0002_CreateSendReceivePop3Email.ini CreateRegistry

RUN_TEST_STEP 100 MessagingTestServer CreatePop3Mtm				c:\msgtest\TestFramework\ScriptedTestCases\CR657\MSG-EMAIL-CR657_0002_CreateSendReceivePop3Email.ini CreatePop3Mtm
RUN_TEST_STEP 100 MessagingTestServer CreateSmtpMtm				c:\msgtest\TestFramework\ScriptedTestCases\CR657\MSG-EMAIL-CR657_0002_CreateSendReceivePop3Email.ini CreateSmtpMtm

RUN_TEST_STEP 100 MessagingTestServer ConnectPop3Server			c:\msgtest\TestFramework\ScriptedTestCases\CR657\MSG-EMAIL-CR657_0002_CreateSendReceivePop3Email.ini ConnectPop3Server
RUN_TEST_STEP 100 MessagingTestServer DeleteChildren				c:\msgtest\TestFramework\ScriptedTestCases\CR657\MSG-EMAIL-CR657_0002_CreateSendReceivePop3Email.ini DeleteChildren
RUN_TEST_STEP 100 MessagingTestServer CheckChildrenCount			c:\msgtest\TestFramework\ScriptedTestCases\CR657\MSG-EMAIL-CR657_0002_CreateSendReceivePop3Email.ini CheckChildrenCount0
RUN_TEST_STEP 100 MessagingTestServer DisconnectPop3Server		c:\msgtest\TestFramework\ScriptedTestCases\CR657\MSG-EMAIL-CR657_0002_CreateSendReceivePop3Email.ini DisconnectPop3Server

RUN_TEST_STEP 100 MessagingTestServer CreatePop3MailInfo			c:\msgtest\TestFramework\ScriptedTestCases\CR657\MSG-EMAIL-CR657_0002_CreateSendReceivePop3Email.ini CreatePop3MailInfo
RUN_TEST_STEP 100 MessagingTestServer CreateExpPop3MailInfo		c:\msgtest\TestFramework\ScriptedTestCases\CR657\MSG-EMAIL-CR657_0002_CreateSendReceivePop3Email.ini CreateExpPop3MailInfo0
RUN_TEST_STEP 100 MessagingTestServer SetDefaultConfiguration		c:\msgtest\TestFramework\ScriptedTestCases\CR657\MSG-EMAIL-CR657_0002_CreateSendReceivePop3Email.ini SetDefaultConfiguration

RUN_TEST_STEP 100 MessagingTestServer EXECUTE_TEST_CASE

RUN_TEST_STEP 100 MessagingTestServer CreateSmtpMessageFromEmailFile	c:\msgtest\TestFramework\ScriptedTestCases\CR657\MSG-EMAIL-CR657_0002_CreateSendReceivePop3Email.ini CreateSmtpMessageFromEmailFile0
RUN_TEST_STEP 100 MessagingTestServer CopyEntry				c:\msgtest\TestFramework\ScriptedTestCases\CR657\MSG-EMAIL-CR657_0002_CreateSendReceivePop3Email.ini CopyEntry

RUN_TEST_STEP 100 MessagingTestServer CheckChildrenCount			c:\msgtest\TestFramework\ScriptedTestCases\CR657\MSG-EMAIL-CR657_0002_CreateSendReceivePop3Email.ini CheckChildrenCount_sent4
RUN_TEST_STEP 100 MessagingTestServer ConnectPop3Server			c:\msgtest\TestFramework\ScriptedTestCases\CR657\MSG-EMAIL-CR657_0002_CreateSendReceivePop3Email.ini ConnectPop3Server
RUN_TEST_STEP 100 MessagingTestServer CreateChildrenSelection		c:\msgtest\TestFramework\ScriptedTestCases\CR657\MSG-EMAIL-CR657_0002_CreateSendReceivePop3Email.ini CreateChildrenSelectionPop3
RUN_TEST_STEP 100 MessagingTestServer Pop3TopPopulate			c:\msgtest\TestFramework\ScriptedTestCases\CR657\MSG-EMAIL-CR657_0002_CreateSendReceivePop3Email.ini Pop3TopPopulate
RUN_TEST_STEP 100 MessagingTestServer DisconnectPop3Server		c:\msgtest\TestFramework\ScriptedTestCases\CR657\MSG-EMAIL-CR657_0002_CreateSendReceivePop3Email.ini DisconnectPop3Server

RUN_TEST_STEP 100 MessagingTestServer CHECK_POSTCONDITIONS
RUN_TEST_STEP 100 MessagingTestServer CreateChildrenSelection		c:\msgtest\TestFramework\ScriptedTestCases\CR657\MSG-EMAIL-CR657_0002_CreateSendReceivePop3Email.ini CreateChildrenSelectionPop3
RUN_TEST_STEP 100 MessagingTestServer CreateChildrenSelection		c:\msgtest\TestFramework\ScriptedTestCases\CR657\MSG-EMAIL-CR657_0002_CreateSendReceivePop3Email.ini CreateChildrenSentItems
RUN_TEST_STEP 100 MessagingTestServer VerifyEmail				c:\msgtest\TestFramework\ScriptedTestCases\CR657\MSG-EMAIL-CR657_0002_CreateSendReceivePop3Email.ini VerifyEmail
RUN_TEST_STEP 100 MessagingTestServer VerifyReplyToAddress			c:\msgtest\TestFramework\ScriptedTestCases\CR657\MSG-EMAIL-CR657_0002_CreateSendReceivePop3Email.ini VerifyReplyToAddress

RUN_TEST_STEP 100 MessagingTestServer END_TEST_CASE
