SendMail Sample Database (1 Viewer)

weilerdo

Registered User.
Local time
Today, 00:33
Joined
Apr 21, 2005
Messages
109
Hey All, I came across the sample database that Smig made and am having problems getting it to work. Modules are not my strong point for sure. He says You will need to set up some eMail details for this to work (they are all in the mdl_PublicDeclerations) This is were I get lost I can't seem to figure out how or where to put my info.

Option Compare Database

Public pbUserName As String
Public pbUserEmail As String
Public pbEMailAcountUserName As String
Public pbEMailAcountUserPassword As String
Public pbEMailAcountSMTPHost As String
Public pbEMailAcountSMTPPort As String
Public pbEMailAcountUseAuthentication As Boolean
Public pbEMailAcountPOP3Host As String
Public pbEMailAcountUsePopAuthentication As Boolean

Public pbYourEmail As String ' -- for errors only

And this is my info

pbUserName = "phxbombardier@gmail.com"
pbUserEmail = "phxbombardier@gmail.com"
pbEMailAcountUserName = "phxbombardier@gmail.com"
pbEMailAcountUserPassword = "*******"
pbEMailAcountSMTPHost = "smtp.gmail.com"
pbEMailAcountSMTPPort = "465"
bEMailAcountUseAuthentication = 1
pbEMailAcountPOP3Host = "pop.gmail.com"
bEMailAcountUsePopAuthentication

Any help on this would be greatly appreicated
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 21:33
Joined
Aug 30, 2003
Messages
36,129
Two ways to go. If those are static in the application so you'll always want the same values, instead of

Public pbUserName As String

use

Public Const pbUserName As String = "phxbombardier@gmail.com"

Then you simply use the variable in code. It will always have that value. If the values might change, like you're getting different email addresses from data, leave the declaration as it is and in the code where you're sending an email set the variable:

pbUserName = "phxbombardier@gmail.com"
or
pbUserName = Me.TextboxWithAddressInIt

and then use the variable.

Clear as mud?
 

weilerdo

Registered User.
Local time
Today, 00:33
Joined
Apr 21, 2005
Messages
109
Thanks for the quick reply Paul, I tryed that and I am still getting a compile error Sub or Function not defined on my form for the:

If fn_CheckValidEMail(strCheckValidEMail) = False Then
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 21:33
Joined
Aug 30, 2003
Messages
36,129
That would imply that either "fn_CheckValidEMail" is not a public function in a standard module or that you named the module and function the same thing, which will make Access barf.
 

weilerdo

Registered User.
Local time
Today, 00:33
Joined
Apr 21, 2005
Messages
109
Thanks Again Paul, I think your right it is not showing up anywhere in any public function, so I tried to ream it out and I am getting the same error on like 5 more things in that module so I think I need to regroup and rethink how to go forward
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 21:33
Joined
Aug 30, 2003
Messages
36,129
If it was part of smig's code you probably need to copy/paste it into your db.
 

Users who are viewing this thread

Top Bottom