Home > database >  Online pb call aspemail component error solution
Online pb call aspemail component error solution

Time:09-26

Consult everybody warrior
Email I made a small program, one of the code, a few days ago still can send a success, debugging, today is an error, the original code is as follows:
Oleobject mymail
Long rt1

Mymail=create oleobject
Rt1=mymail. Connecttonewobject (" Persits. MailSender ")
If rt1 & lt;> 0 then
Messagebox (" error ", "not found registered components")
The else
Mymail. Reset
Mymail. Host="smtp.163.com"//email server
Mymail. From="[email protected]"//the sender email address
Mymail. FromName="test"//sender name
Mymail. Username="yangz"//mail server user name
Mymail. Password="333444"//mail server password
Mymail. AddAddress (" [email protected] ")
Mymail. Charset="utf-8"//set up support for the Chinese character set
Mymail. AddAttachment (" c: \ err. TXT ")
Mymail. Subject="Subject"
Mymail. Body="email"
Mymail. Send
Mymail. Disconnectobject ()
Messagebox (" email ", "your email sent successfully!" )
End the if

Run the program, the prompt error message:
Error: Erroe accessing external object property username at line 114 in clicked event of object w_main
I checked, line 114 is
Mymail. Username="yangz"//mail server user name

Depressed, aspemail has registered, what happened?

CodePudding user response:

I also report the user name, password, don't know how to solve, are you in here, do you send solution to me, [email protected]
  • Related