Not sure if this qualifies as a mod as such but it's something I am using which works for me.
The mod adds two more fields to the admin email server page which allows you to enter the username and password for authentication of your SMTP account if you need it.
It just requires the addition of a few lines of code to the following files.
Here 'tis...
admin_config_email.asp
" <tr valign=""top"">" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>SMTP Server Username:</b> </font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """>" & vbNewLine & _
" <input type=""text"" name=""strMailUsername"" size=""25"" value=""" & strMailUsername & """>" & vbNewLine & _
" <a href=""JavaScript:openWindow3('pop_config_help.asp?mode=email#username')"">" & getCurrentIcon(strIconSmileQuestion,"","") & "</a></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""top"">" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>SMTP Server Password:</b> </font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """>" & vbNewLine & _
" <input type=""Password"" name=""strMailPassword"" size=""25"" value=""" & strMailPassword & """>" & vbNewLine & _
" <a href=""JavaScript:openWindow3('pop_config_help.asp?mode=email#password')"">" & getCurrentIcon(strIconSmileQuestion,"","") & "</a></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
after this bit...
" <tr valign=""top"">" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>E-mail Server Address:</b> </font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """>" & vbNewLine & _
" <input type=""text"" name=""strMailServer"" size=""25"" value=""" & strMailServer & """>" & vbNewLine & _
" <a href=""JavaScript:openWindow3('pop_config_help.asp?mode=email#mailserver')"">" & getCurrentIcon(strIconSmileQuestion,"","") & "</a></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
config.asp
Dim strMailMode, strMailServer, strMailUsername, strMailPassword, strSender, strDateType, strTimeAdjust
where the...
Dim strMailMode, strMailServer, strSender, strDateType, strTimeAdjust
used to be. Plus...
strMailUsername = Application(strCookieURL & "STRMAILUSERNAME")
strMailPassword = Application(strCookieURL & "STRMAILPASSWORD")
below
strMailServer = Application(strCookieURL & "STRMAILSERVER")
inc_create_forum_configvalues.asp
strDummy = SetConfigValue(1,"STRMAILUSERNAME","Your_Username")
strDummy = SetConfigValue(1,"STRMAILPASSWORD","password")
below
strDummy = SetConfigValue(1,"STRMAILSERVER","your.mailserver.com")
inc_mail.asp
I'm also using this script for cdodys so replace your entry if you want
case "cdosys"
Const cdoSendUsingMethod = "http://schemas.microsoft.com/cdo/configuration/sendusing"
Const cdoSendUsingPort = 2
Const cdoSMTPServer = "http://schemas.microsoft.com/cdo/configuration/smtpserver"
Const cdoSMTPServerPort = "http://schemas.microsoft.com/cdo/configuration/smtpserverport"
Const cdoSMTPConnectionTimeout = "http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"
Const cdoSMTPAuthenticate = "http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"
Const cdoBasic = 1
Const cdoSendUserName = "http://schemas.microsoft.com/cdo/configuration/sendusername"
Const cdoSendPassword = "http://schemas.microsoft.com/cdo/configuration/sendpassword"
Dim objConfig ' As CDO.Configuration
Dim objMessage ' As CDO.Message
Dim Fields ' As ADODB.Fields
Set objConfig = Server.CreateObject("CDO.Configuration")
Set Fields = objConfig.Fields
With Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = strMailServer
.Item(cdoSMTPServerPort) = 25
.Item(cdoSMTPConnectionTimeout) = 10
.Item(cdoSMTPAuthenticate) = cdoBasic
.Item(cdoSendUserName) = strMailUsername 'Usernamevariable
.Item(cdoSendPassword) = strMailPassword 'Passwordvariable
.Update
End With
Set objMessage = Server.CreateObject("CDO.Message")
Set objMessage.Configuration = objConfig
Err.Clear
With objMessage
.To = strRecipients
.From = strSender
.Subject = strSubject
.TextBody = strMessage
.Send
End With
If Err <> 0 Then
Err_Msg = Err_Msg & "<li>Your request was not sent due to the following error: " & Err.Description & "</li>"
End if
setup.asp
strDummy = SetConfigValue(0,"STRMAILUSERNAME", rs("C_STRMAILUSERNAME"))
strDummy = SetConfigValue(0,"STRMAILPASSWORD", rs("C_STRMAILPASSWORD"))
below
strDummy = SetConfigValue(0,"STRMAILSERVER", rs("C_STRMAILSERVER"))
After changing the code I ran the setup.asp file and did an upgrade. Not sure if this is needed or not.
If you are not using a version of inc_mail which includes authentication for the various mail components then you'll have to get a hold of one. I'll package the whole thing up soon with this included. If you do then just replace your strings with strMailUsername and strMailPassword.
If you can use CDOSYS then you can just use the script I have.
Any feedback appreciated.
Cheers,
Raavin