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

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.
Kashyap MakadiaSoftware EngineerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

CT
0
Kashyap MakadiaSoftware EngineerAuthor Commented:
Error : Failure sending mail.



SendMail(MailFrom, MailTo, MailSubject, MailBody)
{
            try
                {
                
                if(MailFrom==null)
                    {
                    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");
                clnt.Send(msg);
                msg.Dispose();
                return 1;
                }
            catch
                {
                return -1;
                }
}

Open in new window

0
ComputerTechieCommented:
Here a sample of how we do it.

CT
<?php 
 
    $fileloc="pdf/11000028.pdf";
    $filename="11000028.pdf"; 
    $filetype=="application/octet-stream";
 
if ($filetype>"") {
 
	$message= 'Test message';
 
    // MAIL SUBJECT 
 
    $subject = "Mail with doc file attachment"; 
 
    // TO MAIL ADDRESS 
 
    $to="to@mail.com"; 
 
    // MAIL HEADERS 
 
    $headers  = "MIME-Version: 1.0\n"; 
    $headers .= "Content-type: text/html; charset=iso-8859-1\n"; 
    $headers .= "From: Name <name@name.com>\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<test@test.com>\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); 
   fclose($fp); 
   echo '<font style="font-family:Verdana, Arial; font-size:11px; color:#333333; font-weight:bold">Attachment has been sent Successfully.<br /></font>'; 
 
} 
 
else 
 
    { 
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

0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Kashyap MakadiaSoftware EngineerAuthor Commented:
Dear

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.
0
ComputerTechieCommented:
Ah ok I missed that part. Let me know if this test works.

CT
 
<%@ 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...";
                                              
 
    SmtpMail.Send(msg); 
 
    lblStatus.Text = "Sent email (" + txtSubject.Text + ") to " +txtTo.Text;                                          
 
} 
 
</script>  
 
<html> 
 
<body> 
 
    <h3> 
 
        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:Label> 
 
        <asp:TextBox ID="txtFrom" Style="left: 200px; position: absolute; top: 100px" 
 
          runat="server"></asp:TextBox> 
 
        <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:RegularExpressionValidator> 
 
        <asp:Label ID="Label2" Style="left: 100px; position: absolute; top: 125px" runat="server">To:  
 
        </asp:Label> 
 
        <asp:TextBox ID="txtTo" Style="left: 200px; position: absolute; top: 125px" 
 
          runat="server"></asp:TextBox> 
 
        <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:RegularExpressionValidator> 
 
        <asp:Label ID="Label3" Style="left: 100px; position: absolute; top: 150px" 
 
          runat="server">Subject</asp:Label> 
 
        <asp:TextBox ID="txtSubject" Style="left: 200px; position: absolute; top: 150px" 
 
            runat="server"></asp:TextBox> 
 
        <asp:Label ID="Label4" Style="left: 100px; position: absolute; top: 175px" runat="server">Mail: 
 
        </asp:Label> 
 
        <textarea runat="server" id="txtContent" style="left: 200px; width: 400px; position: absolute; 
 
            top: 175px; height: 125px" rows="7" cols="24"> 
 
                </textarea> 
 
        <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">  
 
        </asp:Label> 
 
    </form> 
 
</body> 
 
</html>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Kashyap MakadiaSoftware EngineerAuthor Commented:
There is no error returns

it displays that mail sent successfully

but mail is not received.
0
ComputerTechieCommented:
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.

CT
0
ComputerTechieCommented:
Ah check this setting.

https://kc.mcafee.com/corporate/index?page=content&id=KB54134

Solution
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.

CT
0
Kashyap MakadiaSoftware EngineerAuthor Commented:
Hi ComputerTechie

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

Thank you very much.
0
knappkinCommented:
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.
0
Kashyap MakadiaSoftware EngineerAuthor Commented:
Dear its done
but i need to stop three mcafee servuces
1)Access Protection
2)Buffer Overflow Protection
3)On-Delivery Email Scanner
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Protocols

From novice to tech pro — start learning today.