Have you tried performing these steps?

1) From the Solution Explorer window of Visual Studio, click the
References folder.
2) Check if your aspNetEmail namespace is present and has a bang or
exclamation symbol (or "!"). If it does, just click it. Visual Studio
will
    attempt to reload that dll.
3) Rebuild/re-compile.


Let me know if it works.



Regards,



Benj



On Oct 27, 12:04 am, Brad <[email protected]> wrote:
> I added a reference to an external program via the browse feature.
> Once it is added, I have full access of the DLL, however, as soon as I
> complie, the application does not reference it and gives me the error
> message:
>
> "The type or namespace name 'aspNetEmail" could not be found (are you
> missing a using directive or an assembly reference?)"
>
> ---------------------------------------------------------------------
> using System.Drawing;
> using System.Linq;
> using System.Text;
> using System.Windows.Forms;
> using aspNetEmail;  // as soon as I build, this becomes unrecognizable
>
> namespace WindowsFormsApplication1
> {
>     public partial class Form1 : Form
>     {
>         public Form1()
>         {
>             InitializeComponent();
>         }
>
>         private void button1_Click(object sender, EventArgs e)
>         {
>
>             aspNetEmail.EmailMessage msg = new
> EmailMessage("smtp.gmail.com");  // This line is unreadable also
>
>             msg.Logging = true;
>             msg.LogPath = @"C:\EmailTest.log";
>             msg.LogOverwrite = true;
>             msg.LogInMemory = true;
>
>             msg.To = tb_emailto.Text.ToString();
>             msg.From = "Support";
>             msg.FromAddress = "[email protected]";
>             msg.Subject = "This is a test message";
>             msg.Body = "This is just the body of the test message";
>
>             msg.Username = "[email protected]";
>             msg.Password = "abc123";
>
>             try
>             {
>                 msg.Send();
>                 tb_response.Text = msg.LastException().ToString();
>             }
>             catch (Exception ex)
>             {
>                 tb_response.Text = ex.ToString();
>                 return;
>             }
>
>         }
>     }
>
> }

Reply via email to