Mcafee VirusScan Enterprise 8.7i With Antisparyware blocked Asp.Net SMTP(Not Local) server

Posted on 2009-06-27
Last Modified: 2013-11-30
I Have installed McAfee 8.7 VirusScan Enterprise with Antisprayware. and i Uses Asp.Net 2.0 for for mail sending for my developing website i have remote site smtp settings.

when i send email it display it is failed.
even i set settings on VirusConsole>AccessProtection>Antivirus Standard Protection>Prevent mass mailing worms form sending mails
block checkbox is removed bu i still not sending emails.
Question by:Kashyap Makadia
  • 5
  • 5
LVL 23

Expert Comment

ID: 24729077
what is the error you are getting and how are your setting the email?


Author Comment

by:Kashyap Makadia
ID: 24733685
Error : Failure sending mail.

SendMail(MailFrom, MailTo, MailSubject, MailBody)
                    MailFrom="Some Email address of my website";
                MailMessage msg = new MailMessage(MailFrom, MailTo, MailSubject, MailBody);
                msg.IsBodyHtml = true;
                SmtpClient clnt = new SmtpClient();
                clnt.Credentials = new NetworkCredential("USERNAME", "PASSWORD");
                return 1;
                return -1;

Open in new window

LVL 23

Expert Comment

ID: 24737109
Here a sample of how we do it.

if ($filetype>"") {
	$message= 'Test message';
    $subject = "Mail with doc file attachment"; 
    $headers  = "MIME-Version: 1.0\n"; 
    $headers .= "Content-type: text/html; charset=iso-8859-1\n"; 
    $headers .= "From: Name <>\n"; 
    // MAIL HEADERS with attachment 
    $fp = fopen("pdf/11000028.pdf", "rb"); 
    $file = fread($fp); 
    $file = chunk_split(base64_encode($file)); 
    $num = md5(time()); 
        //Normal headers 
       $headers  = "From: Name<>\r\n"; 
       $headers  .= "MIME-Version: 1.0\r\n"; 
       $headers  .= "Content-Type: multipart/mixed; "; 
       $headers  .= "boundary=".$num."\r\n"; 
       $headers  .= "--$num\r\n"; 
        // This two steps to help avoid spam    
       $headers .= "Message-ID: <".$now." TheSystem@".$_SERVER['SERVER_NAME'].">\r\n"; 
       $headers .= "X-Mailer: PHP 5".phpversion()."\r\n";          
        // With message 
    $headers .= "Content-Type: text/html; charset=iso-8859-1\r\n"; 
    $headers .= "Content-Transfer-Encoding: 8bit\r\n"; 
    $headers .= "".$message."\n"; 
    $headers .= "--".$num."\n";  
    // Attachment headers 
    $headers  .= "Content-Type:".$filetype." "; 
    $headers  .= "name=\"".$filename."\"r\n"; 
    $headers  .= "Content-Transfer-Encoding: base64\r\n"; 
    $headers  .= "Content-Disposition: attachment; "; 
    $headers  .= "filename=\"".$fileloc."\"\r\n\n"; 
    $headers  .= "".$file."\r\n"; 
    $headers  .= "--".$num."--"; 
   // SEND MAIL 
   @mail($to, $subject, $message, $headers); 
   echo '<font style="font-family:Verdana, Arial; font-size:11px; color:#333333; font-weight:bold">Attachment has been sent Successfully.<br /></font>'; 
echo '<font style="font-family:Verdana, Arial; font-size:11px; color:#F3363F; font-weight:bold">Wrong file format. Mail was not sent.</font>'; 
        //echo "<script>window.location.href='somewhere.html';</script>"; 

Open in new window

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.


Author Comment

by:Kashyap Makadia
ID: 24742365

I want solution in the Asp.Net

My Code is works fine but not form local when McAfee installed

When I send mail form my local IIS 5.1 SMTP which is not blocked.
LVL 23

Accepted Solution

ComputerTechie earned 125 total points
ID: 24744370
Ah ok I missed that part. Let me know if this test works.

<%@ Import Namespace="System.Web.Mail" %>
<script language="c#" runat="server"> 
private void btnSend_Click(object sender, System.EventArgs e) 
    MailMessage msg = new MailMessage();
    msg.To = txtTo.Text; 
    msg.From = txtFrom.Text; 
    msg.Subject = txtSubject.Text; 
    msg.Body = txtContent.Value;
    lblStatus.Text = "Sending...";
    lblStatus.Text = "Sent email (" + txtSubject.Text + ") to " +txtTo.Text;                                          
        Email From ASP.NET</h3> 
    <form id="MailForm" method="post" runat="server"> 
        <asp:Label ID="Label1" Style="left: 100px; position: absolute; top: 100px" runat="server">From:    
        <asp:TextBox ID="txtFrom" Style="left: 200px; position: absolute; top: 100px" 
        <asp:RequiredFieldValidator ID="FromValidator1" Style="left: 100px; position: absolute; 
            top: 375px" runat="server" ErrorMessage="Please Enter the Email From." Width="200px" 
            Height="23px" ControlToValidate="txtFrom"></asp:RequiredFieldValidator> 
        <asp:RegularExpressionValidator ID="FromValidator2" Style="left: 100px; position: absolute; 
            top: 400px" runat="server" ErrorMessage="Please Enter a Valid From Email address" 
            ControlToValidate="txtFrom" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+) 
        <asp:Label ID="Label2" Style="left: 100px; position: absolute; top: 125px" runat="server">To:  
        <asp:TextBox ID="txtTo" Style="left: 200px; position: absolute; top: 125px" 
        <asp:RequiredFieldValidator ID="ToValidator1" Style="left: 100px; position: absolute; 
            top: 425px" runat="server" ErrorMessage="Please Enter the Email To." Width="200px" 
            Height="23px" ControlToValidate="txtTo"></asp:RequiredFieldValidator> 
        <asp:RegularExpressionValidator ID="ToValidator2" Style="left: 100px; position: absolute; 
            top: 450px" runat="server" ErrorMessage="Please Enter a Valid To Email address" 
            ControlToValidate="txtTo" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+) 
        <asp:Label ID="Label3" Style="left: 100px; position: absolute; top: 150px" 
        <asp:TextBox ID="txtSubject" Style="left: 200px; position: absolute; top: 150px" 
        <asp:Label ID="Label4" Style="left: 100px; position: absolute; top: 175px" runat="server">Mail: 
        <textarea runat="server" id="txtContent" style="left: 200px; width: 400px; position: absolute; 
            top: 175px; height: 125px" rows="7" cols="24"> 
        <asp:Button ID="btnSend" Style="left: 200px; position: absolute; top: 350px" runat="server" 
            Text="Send" OnClick="btnSend_Click"></asp:Button> 
        <asp:Label ID="lblStatus" Style="left: 250px; position: absolute; top: 350px" runat="server">  

Open in new window


Author Comment

by:Kashyap Makadia
ID: 24753940
There is no error returns

it displays that mail sent successfully

but mail is not received.
LVL 23

Expert Comment

ID: 24754179
It seem you antivirus is blocking local email too. check it to see if there is a a setting that opens up local request.
I will do more research on this.

LVL 23

Expert Comment

ID: 24754263
Ah check this setting.

To enable HTTP response inspection:

Launch the IntruShield Manager.
In the left hand pane, open Sensors.
Select the Sensor to configure, click Advanced, then click the HTTP Response Settings tab.
Choose a Sensor port to configure in the drop-down list.
For each Sensor port, select Inbound or Outbound  to choose the direction in which HTTP response packets will be inspected.
Select Apply to confirm the changes.


Author Comment

by:Kashyap Makadia
ID: 24760496
Hi ComputerTechie

You tried very well but I didn't get any solution.

Thank you very much.

Expert Comment

ID: 25212992
Have you tried to telnet to your SMTP server from the box in question?  Ie: telnet yoursmtpserverip:25  This would allow you to quickly test if it is a Access Control Rule still blocking you or if it something else.

Author Comment

by:Kashyap Makadia
ID: 25213222
Dear its done
but i need to stop three mcafee servuces
1)Access Protection
2)Buffer Overflow Protection
3)On-Delivery Email Scanner

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is Usenet? There are many different opinions on exactly what Usenet is an isn't. Many opinions are incorrect simply out of ignorance. The Wikipedia listing about Usenet does a good job of explaining it, so instead of repeating it all here I wi…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question