I have written a code for email using persits.mailsender mail component. I have a function in which i set all the properties and methods of the object. This method is in the different asp file. Then i include this asp file in the file from which i have to send the mail. And when to implement it in the code i just call that method and pass the required values.<BR>I am getting "http 500 Internal Server Error". If i remove this email code from the file it works fine.<BR>Can any one tell me what the error might be.<BR><BR>this is the the function<BR><BR>function mailsender(from,fromname,remail,rname,cc,bcc,html, subject,msg)<BR> Set Mail = Server.CreateObject("Persits.MailSender")<BR> Mail.Host = "" &#039; Specify a valid SMTP server<BR> &#039;Mail.Host = "aribuzz.net" &#039; Specify a valid SMTP server<BR> Mail.From = from<BR> <BR> &#039;fromname = "Agribuzz Team"<BR> &#039;bcc = "Gopal Ahuja","aargopal@vsnl.com;rani@agribuzz.com"<BR> &#039;bcc = "sumukh","sumukhk@excite.com;abhise@yahoo.com" <BR> <BR> if not fromname="" then<BR> Mail.FromName = fromname &#039; Specify sender&#039;s name<BR> end if<BR> <BR> Mail.AddAddress remail,rname<BR> <BR> if not cc="" then<BR> Mail.AddCC cc<BR> end if<BR> <BR> if not bcc="" then<BR> Mail.AddBCC bcc<BR> end if<BR> <BR> if html="h" then<BR> Mail.IsHTML=True &#039;To send the email as HTML in the body&#039;<BR> else<BR> Mail.IsHTML=False<BR> end if<BR> <BR> Mail.Subject = subject<BR> <BR> Mail.Body =msg <BR> &#039;On Error Resume Next<BR> dim mailsuccess<BR> mailsuccess=Mail.Send()<BR><BR> If Err &#060;&#062; 0 OR mailsuccess=False Then<BR> set Mail=nothing<BR> &#039;senderror("Error encountered: " & Err.Description)<BR> End If<BR><BR>set Mail=nothing<BR>end function<BR><BR>and in the diff. file in include this file and use this code to send mail<BR><BR>dim subject,body<BR>body = "This is to inform you that verification of your registration is under process"<BR>subject = "Registration Message"<BR> <BR>mailsender "info@xyz.com","xyz Team",rs("emailid"),rs("musername"),"xyz@yahoo.com ","abc@excite.com","t",subject,body<BR><BR>rs is the recorset to get the value from db.