- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am looking for help with a sendmail problem on my site and do not really know where to go for help. Is there online assistance available through a forum or tech support?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@terry6 wrote:I am looking for help with a sendmail problem on my site and do not really know where to go for help. Is there online assistance available through a forum or tech support?
Verizon blocks port 25 for residential outbound connections. All mail must go through their servers. So SMPT straight to the web is not going to work. You may be able to set ther server up as a forwarder. Depending on what your site is trying to do, you may be able to use CDO_SYS. But Verizon has becone very restrictive regarding scripting and what can be don wit a residential account.
I have used this script as part of a program that reads text reports that are dumped to a file through a scheduler. Uses someone elses server. Verizon's. Why are you running sendmail on a residential connections. Sendmail is a SMPT server application which violates the TOS.
File Name. sendRPT.vbs
'It does work on Vista, Windows 7, 2003 and should work fine on 2008 with no SMTP server running.
'
'Remote server works and has been proven with authentication though Verizon.'
'--------------------------------------------------
'
' Sends email from remote SMTP service using CDO_SYS objects
' Manually define server information in define server section.
'
' Usage:
' sendRPT -t <to> -f <from> -s "<subject>" -r "<Report file name & path>"
' sendRPT [-help|-?]
'
'--------------------------------------------------
Option Explicit
On Error Resume Next
Dim objSendMail, oArgs, ArgNum
Dim strTo, strFrom, strSubject, strBody, strRPT
' Set up command line arguments.
Set oArgs = WScript.Arguments
ArgNum = 0
While ArgNum < oArgs.Count
Select Case LCase(oArgs(ArgNum))
Case "-to","-t":
ArgNum = ArgNum + 1
strTo = oArgs(ArgNum)
Case "-from","-f":
ArgNum = ArgNum + 1
strFrom = oArgs(ArgNum)
Case "-subject","-s":
ArgNum = ArgNum + 1
strSubject = oArgs(ArgNum)
Case "-RPT","-r":
ArgNum = ArgNum + 1
strRPT = oArgs(ArgNum)
Case "-help","-?":
Call DisplayUsage
Case Else:
Call DisplayUsage
End Select
ArgNum = ArgNum + 1
Wend
If oArgs.Count=0 Or strTo="" Or strFrom="" Or _
strSubject="" Or strRPT="" Then
Call DisplayUsage
Else
' This line calls the ReadFile() function to read the page contents.
strBody = ReadFile(strRPT)
' This function opens a file and returns the contents of the file.
Function ReadFile(txtFile)
Dim txtTemp, objFS, objFL
Set objFS = CreateObject("Scripting.FileSystemObject")
Set objFL = objFS.OpenTextFile(txtFile)
Do While Not objFL.AtEndOfStream
txtTemp = txtTemp & objFL.ReadLine
txtTemp = txtTemp & vbCrLf
Loop
objFL.Close
Set objFS = Nothing
ReadFile = txtTemp
End Function
Set ObjSendMail = CreateObject("CDO.Message")
'This section provides the configuration information for the remote SMTP server.
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the message using the network (SMTP over the network).
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver")= "outgoing.verizon.net"
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False 'Use SSL for the connection (True or False)
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
If your server requires outgoing authentication uncomment the lines below and use a valid email address and password.
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername")="YourName@verizon.net"
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="Password"
ObjSendMail.Configuration.Fields.Update
'End remote SMTP server configuration section==
ObjSendMail.To = strTo
ObjSendMail.Subject = strSubject
ObjSendMail.From = strFrom
ObjSendMail.TextBody = strBody
ObjSendMail.Send
Set ObjSendMail = Nothing
End If
' Display the usage for this script
Sub DisplayUsage
WScript.Echo "Usage:"
WScript.Echo " cscript sendRPT.vbs -t <to address> -f <from address> -s " & _
Chr(34) & "<subject>" & Chr(34) & " -r " & Chr(34) & _
"<Report file>" & Chr(34)
WScript.Echo " cscript sendRPT.vbs [-help|-?]"
WScript.Echo ""
WSCript.Quit
End Sub
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a form from which I want to transfer data using email.
Sitecontrol has something called CGIEMAIL which is supposed to be a free script. I could not figure out how to use it even after a google search led to an MIT site describing it.
Looking up cgi on the web there are several formmail scripts available.
I tried one that is just a text file with the extension .cgi and refers to perl and sendmail on the server. I put it in my cgi-bin directory and it worked great. Exactly what I wanted.
A couple of days ago it started slowing down. It held some of the mail overnight. Now it does not work at all.
The script still works and acknowledges the form submission but the email is not sent out.
Why?
I have no interest in using vb and routing to other servers. I just want a simple, straightforward solution to use on my verizon site.