patrudu_k
11-12-2004, 04:12 AM
I am using ASPNetEmail component in one of my aspx pages. It was working fine for quite some time. But now, for the last 3 days, I think after the upgradation of the component, it is giving the following eror message :
'The type or namespace name 'aspNetEmail' could not be found (are you missing a using directive or an assembly reference?)'
I am using the following code snippet in the aspx page:
<script language='C#' runat='server'>
public void SendMailAndRegister_Clicked(object sender, EventArgs e){
aspNetEmail.EmailMessage msg = new aspNetEmail.EmailMessage();
msg.ValidateAddress = false;
msg.Server = 'localhost';
msg.FromAddress = 'info@xyz.com';
msg.FromName = 'abc';
msg.To = email.Text;
msg.Subject = 'abc';
msg.ConfirmRead = true;
msg.ReturnReceipt = true;
msg.HtmlBodyPart ='Message here';
msg.WordWrapLen = 45;
if ( msg.Send() ){
Msg.InnerHtml='Thank you for the details.';
}else{
Msg.InnerHtml='<font face=vardana size=-1 color=darkred >[b]The following error occurred:' + msg.LastException().Message +'</font>[b][b][b][b][b][b]';
}
}
</script>
The above code is working fine on my local m/c with demo ASPnetEmail installed.
Post Edited (patrudu_k) : 4/13/2008 6:18:57 PM GMT
'The type or namespace name 'aspNetEmail' could not be found (are you missing a using directive or an assembly reference?)'
I am using the following code snippet in the aspx page:
<script language='C#' runat='server'>
public void SendMailAndRegister_Clicked(object sender, EventArgs e){
aspNetEmail.EmailMessage msg = new aspNetEmail.EmailMessage();
msg.ValidateAddress = false;
msg.Server = 'localhost';
msg.FromAddress = 'info@xyz.com';
msg.FromName = 'abc';
msg.To = email.Text;
msg.Subject = 'abc';
msg.ConfirmRead = true;
msg.ReturnReceipt = true;
msg.HtmlBodyPart ='Message here';
msg.WordWrapLen = 45;
if ( msg.Send() ){
Msg.InnerHtml='Thank you for the details.';
}else{
Msg.InnerHtml='<font face=vardana size=-1 color=darkred >[b]The following error occurred:' + msg.LastException().Message +'</font>[b][b][b][b][b][b]';
}
}
</script>
The above code is working fine on my local m/c with demo ASPnetEmail installed.
Post Edited (patrudu_k) : 4/13/2008 6:18:57 PM GMT