Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

asp email xp

Posted on 2007-04-03
5
311 Views
Last Modified: 2013-11-30
hi can someone please post a simple scrpt to send emails out via iis using windows xp, i can get this working on server but not on local install.
0
Comment
Question by:synergiq
  • 3
  • 2
5 Comments
 
LVL 16

Expert Comment

by:Wadski
ID: 18842280
have you got an SMTP service installed on your local install?

Are you using CDONTS ?
0
 
LVL 2

Author Comment

by:synergiq
ID: 18842288
here is what i currently have on the server, this however does not work on xp.

<%
Dim sch, cdoConfig, cdoMessage
sch = "http://schemas.microsoft.com/cdo/configuration/"

    Set cdoConfig = CreateObject("CDO.Configuration")

    With cdoConfig.Fields
        'Set CDO Port
       .Item(sch & "sendusing") = 2
        'Set mailserver name either IP address, mail.yoursite.com or localhost
       .Item(sch & "smtpserver") = MailServer
        'Set SMTP port which is 25 by default
       .Item(sch & "smtpserverport") = 25
        'Set number of seconds before timeout
       .Item(sch & "smtpconnectiontimeout") = 60
       .update
   End With

    Set cdoMessage = CreateObject("CDO.Message")

    With cdoMessage
        Set .Configuration = cdoConfig
       .From = MailFrom
       .To = var_email
       .Subject = var_Customer_Address&" (ELECTRIC)"
       .HTMLBody = var_Customer_Address&" (ELECTRIC)"
       .AddAttachment gas_out_box_install&var_formname
       .Send
    End With

    Set cdoMessage = Nothing
    Set cdoConfig = Nothing
%>
0
 
LVL 16

Expert Comment

by:Wadski
ID: 18842339
>  .Item(sch & "smtpserver") = MailServer
You need to change this to the SMTP address of your mailserver.  Locally you can setup an SMTP server in IIS OR you can point it directly to your ISP's Mailserver.  (but you may be required to change this when you put it into a production environment)
0
 
LVL 2

Author Comment

by:synergiq
ID: 18842421
I have set the MailServer variable to my remote mail server, but that still does not work here is the error message I am getting.

(0x8004020F)
The event class for this subscription is in an invalid partition
/mobliq/inc_write_install.asp, line 1075


line 1075 reads

<%
Dim sch, cdoConfig, cdoMessage
sch = "http://schemas.microsoft.com/cdo/configuration/"

    Set cdoConfig = CreateObject("CDO.Configuration")

    With cdoConfig.Fields
        'Set CDO Port
        .Item(sch & "sendusing") = 2
        'Set mailserver name either IP address, mail.yoursite.com or localhost
        .Item(sch & "smtpserver") = MailServer
        'Set SMTP port which is 25 by default
        .Item(sch & "smtpserverport") = 25
        'Set number of seconds before timeout
        .Item(sch & "smtpconnectiontimeout") = 60
        .update
    End With

    Set cdoMessage = CreateObject("CDO.Message")

    With cdoMessage
        Set .Configuration = cdoConfig
        .From = MailFrom
        .To = var_email
    .Subject = var_Customer_Address&" (INSTALL)"
        .HTMLBody = var_Customer_Address&" (INSTALL)"
        .AddAttachment gas_out_box_survey&var_formname
        .Send <--------------------------------------------------------------------1075
    End With

    Set cdoMessage = Nothing
    Set cdoConfig = Nothing
%>
0
 
LVL 16

Accepted Solution

by:
Wadski earned 500 total points
ID: 18842614
Is your remote mailserver allowing you to relay through it? Generally it would be set to prevent this type of connection for fear of being used as an open relay.

I don't believe this is an issue with the code as it works on the remote machine just not locally.
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Pop culture is prime bait for hackers seeking to infect user’s computers and mobile devices with malicious malware. Hackers know exactly what the latest trends are online and know how to use them to their advantage.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

789 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