Solved

How do I test a emailing script on my local machine?

Posted on 2008-10-09
5
323 Views
Last Modified: 2013-11-29
Hi Experts,

I have the following script. I want to change the "jmail.Send("mailhost.chep.com")" to a local mail server that runs off my laptop for testing. How can I configure this?

Thanks
<%

  ' Call JMail to handle emailing
 

  '*************************************************

  '*                                               *

  '*   Produced by Dimac                           *

  '*                                               *

  '*   More examples can be found at 		   *

  '*   http://tech.dimac.net                       *

  '*                                               *

  '*   Support is available at our helpdesk        *

  '*   http://support.dimac.net                    *

  '*                                               *

  '*   Our main website is located at              *

  '*   http://www.dimac.net                        *

  '*                                               *

  '*************************************************
 

  Set jmail = Server.CreateObject("JMail.Message")
 
 

  For i = LBound(arrstrTo) To UBound(arrstrTo)

      jmail.AddRecipient arrstrTo(i)

  Next
 

  jmail.AddRecipient "rxng@vcsmc.com"
 

  jmail.From = "rxng@vcsmc.com"

	

  jmail.Subject = "Test"
 

  jmail.HTMLBody = "Test"
 

  jmail.Send("mailhost.chep.com")
 
 
 

'==================END OF CODE TO EMAIL SCHEDULED APPOINTMENTS=======================================
 

%>

Open in new window

0
Comment
Question by:indyng
  • 3
  • 2
5 Comments
 
LVL 26

Expert Comment

by:jar3817
ID: 22678676
How about you just change the recipient to some test account at gmail or yahoo?
0
 
LVL 1

Author Comment

by:indyng
ID: 22678710
The issue is this line: jmail.Send("mailhost.chep.com")

What is the host if i am using my laptop as the server. I am only testing locally. I want to generate the email and send it to outlook.

Thanks
0
 
LVL 26

Expert Comment

by:jar3817
ID: 22678857
"localhost" or "127.0.0.1"
0
 
LVL 1

Author Comment

by:indyng
ID: 22743202
Like this? Thanks
<% @ LANGUAGE = VBSCRIPT %>

<html>

<body>

<%

  ' Call JMail to handle emailing
 

  '*************************************************

  '*                                               *

  '*   Produced by Dimac                           *

  '*                                               *

  '*   More examples can be found at 		   *

  '*   http://tech.dimac.net                       *

  '*                                               *

  '*   Support is available at our helpdesk        *

  '*   http://support.dimac.net                    *

  '*                                               *

  '*   Our main website is located at              *

  '*   http://www.dimac.net                        *

  '*                                               *

  '*************************************************
 

  Set jmail = Server.CreateObject("JMail.Message")
 
 

  jmail.AddRecipient "rxng@vcsmc.com"
 

  jmail.From = "rxng@vcsmc.com"
 

  jmail.Subject = "This is a test"
 

  jmail.HTMLBody = "Hello there"
 

  jmail.Send("127.0.0.1")

%>
 

Mail sent..

</html>

Open in new window

0
 
LVL 26

Accepted Solution

by:
jar3817 earned 500 total points
ID: 22744454
Assuming you have a mail server listening on your local computer that will accept mail for vcsmc.com, yes.
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Remove / Re-Install Exchange 2013 with Exchage 2007 still active 7 43
php mail headers 2 45
Email Issue 3 73
Using Classic ASP inside HTML pages 2 56
Microsoft has released various new features which are capable of handling various tasks. One of these tasks is ‘Migration from pop3 to Exchange Server’. Pop3 data stores various data along mailboxes like contacts, tasks, etc. So, it becomes the need…
Import PST to Exchange using Power Shell new-mailboximportrequest command, you can simply import the PST file into Exchange mailbox or archived. To know How to import PST into Exchange  2013 read the complete article.
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now