CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting
ASP.NET MVC Ready – 3 Months Free and Free Setup



Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > starter_kits_and_source_projects.classifieds_starter_kit Tags:
Item Type: NewsGroup Date Entered: 3/22/2007 3:44:08 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 34 Views: 23 Favorited: 0 Favorite
35 Items, 2 Pages 1 2 |< << Go >> >|
ahari312
Asp.Net User
Can someone help me with getting email to wotk within classified starter kit?3/22/2007 3:44:08 PM

0

Hello Everyone

I have been working on this project for a while now. I had a family emergency during an earlier post and was not able to get back to it until now. But I am bordering on desperate to get this link working now so anyone that can help me I would be more appreciative.

When you are logged in and try to respond to an ad you get the error message "Email Not Sent. Contact Site Administrator"..

I am brand new to ASP. I was given the following advice to fix the problem but I am unsure of where to Dim the variables. Can someone tell me in which file do I declare the variables?

 

many thanks

<

system.net

>

<

mailSettings

>

<

smtp

deliveryMethod="Network" from="[email protected]">

<

network

host="mailserver.domain.co.uk" port="25" userName="[email protected]" password="password" defaultCredentials="true"/>

</

smtp

>

</

mailSettings

>

</

system.net

>

Then

Dim

maFrom

As New MailAddress("[email protected]")

Dim

maTo

As New MailAddress("[email protected]")

Dim

m

As New MailMessage(maFrom, maTo)

Dim smtp As New SmtpClient()

smtp.UseDefaultCredentials =

True

smtp.Send(m)

 

Svante
Asp.Net User
Re: Can someone help me with getting email to wotk within classified starter kit?3/22/2007 7:07:32 PM

0

You want to set defaultCredentials to 'false'. It's enough to do it one place. Setting it to false, means that it will use the password and user provided in Web.Config. Setting to to true means that it will use the credentials valid for the current executing thread - this is only useful if the smtp-server is in your own network.
Svante
AxCrypt - Free Open Source File Encryption & Online Password Manager - http://www.axantum.com/
[Disclaimer: Code snippets usually uncompiled, beware typos.]
______
Don't forget to click "Mark as Answer" on the post(s) that helped you.
ahari312
Asp.Net User
Re: Can someone help me with getting email to wotk within classified starter kit?3/22/2007 8:13:04 PM

0

ok... I think I understand...

It is running on GoDaddy's server.... Will changing the defaultCredentials to false help while running it on GoDaddy's server? 

Do I need this little snippet of code and if so where does it go... I know it doesn;t go in the web.config file.... I was looking at the ShowAd file but I can;t tell for sure if that is exactly where it goes or not.... thanks for any help I can get at this point.. I really need to get this site operating... it is located at www.garagesaleorlando.com most of the links work until you try to respond to an ad. thanks

 

Then

Dim

maFrom

As New MailAddress("[email protected]")

Dim

maTo

As New MailAddress("[email protected]")

Dim

m

As New MailMessage(maFrom, maTo)

Dim smtp As New SmtpClient()

smtp.UseDefaultCredentials =

True

smtp.Send(m)

Svante
Asp.Net User
Re: Can someone help me with getting email to wotk within classified starter kit?3/23/2007 5:33:50 AM

0

Code similar or like what you show should go somewhere right before you want to send an e-mail. Obviously you want to change some things. I'm not familiar with the 'classified starter kit', but presumably if it has the capability to send e-mail, it already contains the appropriate code similar to what you show. Please note that the defaultCredentials attribute should be set to 'false' if you want to use the username and password provided in Web.Config, and set to 'true' if you want to use the credentials (i.e. username and password) associated with the running thread as the application executes. I have no idea how Go Daddys setup works, check with them. If you've received an smtp-server address and a username and password that you're supposed to use when sending mail, then enter them in Web.Config and set defaultCredentials to 'false'.
Svante
AxCrypt - Free Open Source File Encryption & Online Password Manager - http://www.axantum.com/
[Disclaimer: Code snippets usually uncompiled, beware typos.]
______
Don't forget to click "Mark as Answer" on the post(s) that helped you.
ahari312
Asp.Net User
Re: Can someone help me with getting email to wotk within classified starter kit?3/23/2007 9:53:42 PM

0

Thank you for all of your help. I am really illerate when it comes to ASP but I am trying to learn it and I am having a little difficulty with this part - "Code similar or like what you show should go somewhere right before you want to send an e-mail" That somewhere is what I am trying to figure out......

Where would I declare variables to hold the email address that users would input into the form when they want to respond to the AD. That would be the MailAddress, maFrom & maTo I presume.. But I don?t know what file to declare this code into?.I don?t think it would go into the webconfig file but I don?t think so?. There is a file called PostAD.ASP that the form that one would submit to "respond to Ad" is located? I thought it might go in there?. but I am not sure? I have tried a few ideas.. But so far nothing has worked?.

Any help would be greatly appreciated?

thanks

 

Dim

maFrom

As

New MailAddress("[email protected]")

Dim

maTo

As

New MailAddress("[email protected]")

Dim

m

As

New MailMessage(maFrom, maTo)

Dim smtp As New SmtpClient()

smtp.UseDefaultCredentials =

True

smtp.Send(m)

Svante
Asp.Net User
Re: Can someone help me with getting email to wotk within classified starter kit?3/24/2007 10:25:49 AM

0

I'm afraid that you need to start a little bit from the beginning and learn some of the basics of ASP.NET. Check out for example http://msdn2.microsoft.com/en-us/library/98wzsc30.aspx, or buy a book on ASP.NET basics. I'll be happy to answer specific questions, but I cannot write your programs...
Svante
AxCrypt - Free Open Source File Encryption & Online Password Manager - http://www.axantum.com/
[Disclaimer: Code snippets usually uncompiled, beware typos.]
______
Don't forget to click "Mark as Answer" on the post(s) that helped you.
ahari312
Asp.Net User
Re: Can someone help me with getting email to wotk within classified starter kit?3/29/2007 6:09:59 PM

0

I appreciate all of your help. I can see why you would think I want you to write my code for me but I assure you I do not. I am just a little green and I am having a very hard time articulating my exact problem.

I do however seem to have all of the correct code.

 

public

static bool SendAdInEmail(int adId, string senderName, string senderAddress, string recipientEmail, string subject, string message)

{

bool sent = false;

string from = String.Format("{0} <{1}>", senderName, senderAddress);

try

{

MailMessage m = new MailMessage(from, recipientEmail);

m.Subject = subject;

m.Body = message;

SmtpClient client = new SmtpClient();

client.Send(m);

sent =

true;

}

This seems to be the correct code for sending the Ad in an Email

 

string

from = String.Format("{0} <{1}>", senderName, senderAddress);

try

{

MailMessage m = new MailMessage(from, adUser.Email);

m.Subject =

"Response for Ad: " + ad.Title;

m.Body = sb.ToString();

SmtpClient client = new SmtpClient();

client.Send(m);

IncrementResponseCount(adId);

sent =

true;

}

This is what we have for when the user clicks on "Respond to Email"

Here is what we have in the web config file?

<

system.net>

<

mailSettings>

<

smtp>

<

network host="Server=whsql-v05.prod.mesa1.secureserver.net" port="25" defaultCredentials="false" userName="ourUserName" password="ourPassword" />

</

smtp>

</

mailSettings>

</

system.net>

I can?t see anything wrong anywhere. Do you see anything wrong with ur code?

I am open for any suggestions? I am at a loss at this point.. I just don;t know what else to check...

I am clearly calling my SMTP Client to send the email so what else can i do? ( Emails are not sent within the program when "Respond to Email" submit button is pushed...)

Thank you for your time.

ALICIA

ahari312
Asp.Net User
Re: Can someone help me with getting email to wotk within classified starter kit?3/29/2007 6:10:09 PM

0

I appreciate all of your help. I can see why you would think I want you to write my code for me but I assure you I do not. I am just a little green and I am having a very hard time articulating my exact problem.

I do however seem to have all of the correct code.

 

public

static bool SendAdInEmail(int adId, string senderName, string senderAddress, string recipientEmail, string subject, string message)

{

bool sent = false;

string from = String.Format("{0} <{1}>", senderName, senderAddress);

try

{

MailMessage m = new MailMessage(from, recipientEmail);

m.Subject = subject;

m.Body = message;

SmtpClient client = new SmtpClient();

client.Send(m);

sent =

true;

}

This seems to be the correct code for sending the Ad in an Email

 

string

from = String.Format("{0} <{1}>", senderName, senderAddress);

try

{

MailMessage m = new MailMessage(from, adUser.Email);

m.Subject =

"Response for Ad: " + ad.Title;

m.Body = sb.ToString();

SmtpClient client = new SmtpClient();

client.Send(m);

IncrementResponseCount(adId);

sent =

true;

}

This is what we have for when the user clicks on "Respond to Email"

Here is what we have in the web config file?

<

system.net>

<

mailSettings>

<

smtp>

<

network host="Server=whsql-v05.prod.mesa1.secureserver.net" port="25" defaultCredentials="false" userName="ourUserName" password="ourPassword" />

</

smtp>

</

mailSettings>

</

system.net>

I can?t see anything wrong anywhere. Do you see anything wrong with ur code?

I am open for any suggestions? I am at a loss at this point.. I just don;t know what else to check...

I am clearly calling my SMTP Client to send the email so what else can i do? ( Emails are not sent within the program when "Respond to Email" submit button is pushed...)

Thank you for your time.

ALICIA

ahari312
Asp.Net User
Re: Can someone help me with getting email to wotk within classified starter kit?3/29/2007 6:10:28 PM

0

I appreciate all of your help. I can see why you would think I want you to write my code for me but I assure you I do not. I am just a little green and I am having a very hard time articulating my exact problem.

I do however seem to have all of the correct code.

 

public

static bool SendAdInEmail(int adId, string senderName, string senderAddress, string recipientEmail, string subject, string message)

{

bool sent = false;

string from = String.Format("{0} <{1}>", senderName, senderAddress);

try

{

MailMessage m = new MailMessage(from, recipientEmail);

m.Subject = subject;

m.Body = message;

SmtpClient client = new SmtpClient();

client.Send(m);

sent =

true;

}

This seems to be the correct code for sending the Ad in an Email

 

string

from = String.Format("{0} <{1}>", senderName, senderAddress);

try

{

MailMessage m = new MailMessage(from, adUser.Email);

m.Subject =

"Response for Ad: " + ad.Title;

m.Body = sb.ToString();

SmtpClient client = new SmtpClient();

client.Send(m);

IncrementResponseCount(adId);

sent =

true;

}

This is what we have for when the user clicks on "Respond to Email"

Here is what we have in the web config file?

<

system.net>

<

mailSettings>

<

smtp>

<

network host="Server=whsql-v05.prod.mesa1.secureserver.net" port="25" defaultCredentials="false" userName="ourUserName" password="ourPassword" />

</

smtp>

</

mailSettings>

</

system.net>

I can?t see anything wrong anywhere. Do you see anything wrong with ur code?

I am open for any suggestions? I am at a loss at this point.. I just don;t know what else to check...

I am clearly calling my SMTP Client to send the email so what else can i do? ( Emails are not sent within the program when "Respond to Email" submit button is pushed...)

Thank you for your time.

ALICIA

ahari312
Asp.Net User
Re: Can someone help me with getting email to wotk within classified starter kit?3/29/2007 6:10:34 PM

0

I appreciate all of your help. I can see why you would think I want you to write my code for me but I assure you I do not. I am just a little green and I am having a very hard time articulating my exact problem.

I do however seem to have all of the correct code.

 

public

static bool SendAdInEmail(int adId, string senderName, string senderAddress, string recipientEmail, string subject, string message)

{

bool sent = false;

string from = String.Format("{0} <{1}>", senderName, senderAddress);

try

{

MailMessage m = new MailMessage(from, recipientEmail);

m.Subject = subject;

m.Body = message;

SmtpClient client = new SmtpClient();

client.Send(m);

sent =

true;

}

This seems to be the correct code for sending the Ad in an Email

 

string

from = String.Format("{0} <{1}>", senderName, senderAddress);

try

{

MailMessage m = new MailMessage(from, adUser.Email);

m.Subject =

"Response for Ad: " + ad.Title;

m.Body = sb.ToString();

SmtpClient client = new SmtpClient();

client.Send(m);

IncrementResponseCount(adId);

sent =

true;

}

This is what we have for when the user clicks on "Respond to Email"

Here is what we have in the web config file?

<

system.net>

<

mailSettings>

<

smtp>

<

network host="Server=whsql-v05.prod.mesa1.secureserver.net" port="25" defaultCredentials="false" userName="ourUserName" password="ourPassword" />

</

smtp>

</

mailSettings>

</

system.net>

I can?t see anything wrong anywhere. Do you see anything wrong with ur code?

I am open for any suggestions? I am at a loss at this point.. I just don;t know what else to check...

I am clearly calling my SMTP Client to send the email so what else can i do? ( Emails are not sent within the program when "Respond to Email" submit button is pushed...)

Thank you for your time.

ALICIA

ahari312
Asp.Net User
Re: Can someone help me with getting email to wotk within classified starter kit?3/29/2007 6:10:40 PM

0

I appreciate all of your help. I can see why you would think I want you to write my code for me but I assure you I do not. I am just a little green and I am having a very hard time articulating my exact problem.

I do however seem to have all of the correct code.

 

public

static bool SendAdInEmail(int adId, string senderName, string senderAddress, string recipientEmail, string subject, string message)

{

bool sent = false;

string from = String.Format("{0} <{1}>", senderName, senderAddress);

try

{

MailMessage m = new MailMessage(from, recipientEmail);

m.Subject = subject;

m.Body = message;

SmtpClient client = new SmtpClient();

client.Send(m);

sent =

true;

}

This seems to be the correct code for sending the Ad in an Email

 

string

from = String.Format("{0} <{1}>", senderName, senderAddress);

try

{

MailMessage m = new MailMessage(from, adUser.Email);

m.Subject =

"Response for Ad: " + ad.Title;

m.Body = sb.ToString();

SmtpClient client = new SmtpClient();

client.Send(m);

IncrementResponseCount(adId);

sent =

true;

}

This is what we have for when the user clicks on "Respond to Email"

Here is what we have in the web config file?

<

system.net>

<

mailSettings>

<

smtp>

<

network host="Server=whsql-v05.prod.mesa1.secureserver.net" port="25" defaultCredentials="false" userName="ourUserName" password="ourPassword" />

</

smtp>

</

mailSettings>

</

system.net>

I can?t see anything wrong anywhere. Do you see anything wrong with ur code?

I am open for any suggestions? I am at a loss at this point.. I just don;t know what else to check...

I am clearly calling my SMTP Client to send the email so what else can i do? ( Emails are not sent within the program when "Respond to Email" submit button is pushed...)

Thank you for your time.

ALICIA

ahari312
Asp.Net User
Re: Can someone help me with getting email to wotk within classified starter kit?3/29/2007 6:10:44 PM

0

I appreciate all of your help. I can see why you would think I want you to write my code for me but I assure you I do not. I am just a little green and I am having a very hard time articulating my exact problem.

I do however seem to have all of the correct code.

 

public

static bool SendAdInEmail(int adId, string senderName, string senderAddress, string recipientEmail, string subject, string message)

{

bool sent = false;

string from = String.Format("{0} <{1}>", senderName, senderAddress);

try

{

MailMessage m = new MailMessage(from, recipientEmail);

m.Subject = subject;

m.Body = message;

SmtpClient client = new SmtpClient();

client.Send(m);

sent =

true;

}

This seems to be the correct code for sending the Ad in an Email

 

string

from = String.Format("{0} <{1}>", senderName, senderAddress);

try

{

MailMessage m = new MailMessage(from, adUser.Email);

m.Subject =

"Response for Ad: " + ad.Title;

m.Body = sb.ToString();

SmtpClient client = new SmtpClient();

client.Send(m);

IncrementResponseCount(adId);

sent =

true;

}

This is what we have for when the user clicks on "Respond to Email"

Here is what we have in the web config file?

<

system.net>

<

mailSettings>

<

smtp>

<

network host="Server=whsql-v05.prod.mesa1.secureserver.net" port="25" defaultCredentials="false" userName="ourUserName" password="ourPassword" />

</

smtp>

</

mailSettings>

</

system.net>

I can?t see anything wrong anywhere. Do you see anything wrong with ur code?

I am open for any suggestions? I am at a loss at this point.. I just don;t know what else to check...

I am clearly calling my SMTP Client to send the email so what else can i do? ( Emails are not sent within the program when "Respond to Email" submit button is pushed...)

Thank you for your time.

ALICIA

ahari312
Asp.Net User
Re: Can someone help me with getting email to wotk within classified starter kit?3/29/2007 6:10:50 PM

0

I appreciate all of your help. I can see why you would think I want you to write my code for me but I assure you I do not. I am just a little green and I am having a very hard time articulating my exact problem.

I do however seem to have all of the correct code.

 

public

static bool SendAdInEmail(int adId, string senderName, string senderAddress, string recipientEmail, string subject, string message)

{

bool sent = false;

string from = String.Format("{0} <{1}>", senderName, senderAddress);

try

{

MailMessage m = new MailMessage(from, recipientEmail);

m.Subject = subject;

m.Body = message;

SmtpClient client = new SmtpClient();

client.Send(m);

sent =

true;

}

This seems to be the correct code for sending the Ad in an Email

 

string

from = String.Format("{0} <{1}>", senderName, senderAddress);

try

{

MailMessage m = new MailMessage(from, adUser.Email);

m.Subject =

"Response for Ad: " + ad.Title;

m.Body = sb.ToString();

SmtpClient client = new SmtpClient();

client.Send(m);

IncrementResponseCount(adId);

sent =

true;

}

This is what we have for when the user clicks on "Respond to Email"

Here is what we have in the web config file?

<

system.net>

<

mailSettings>

<

smtp>

<

network host="Server=whsql-v05.prod.mesa1.secureserver.net" port="25" defaultCredentials="false" userName="ourUserName" password="ourPassword" />

</

smtp>

</

mailSettings>

</

system.net>

I can?t see anything wrong anywhere. Do you see anything wrong with ur code?

I am open for any suggestions? I am at a loss at this point.. I just don;t know what else to check...

I am clearly calling my SMTP Client to send the email so what else can i do? ( Emails are not sent within the program when "Respond to Email" submit button is pushed...)

Thank you for your time.

ALICIA

ahari312
Asp.Net User
Re: Can someone help me with getting email to wotk within classified starter kit?3/29/2007 6:10:54 PM

0

I appreciate all of your help. I can see why you would think I want you to write my code for me but I assure you I do not. I am just a little green and I am having a very hard time articulating my exact problem.

I do however seem to have all of the correct code.

 

public

static bool SendAdInEmail(int adId, string senderName, string senderAddress, string recipientEmail, string subject, string message)

{

bool sent = false;

string from = String.Format("{0} <{1}>", senderName, senderAddress);

try

{

MailMessage m = new MailMessage(from, recipientEmail);

m.Subject = subject;

m.Body = message;

SmtpClient client = new SmtpClient();

client.Send(m);

sent =

true;

}

This seems to be the correct code for sending the Ad in an Email

 

string

from = String.Format("{0} <{1}>", senderName, senderAddress);

try

{

MailMessage m = new MailMessage(from, adUser.Email);

m.Subject =

"Response for Ad: " + ad.Title;

m.Body = sb.ToString();

SmtpClient client = new SmtpClient();

client.Send(m);

IncrementResponseCount(adId);

sent =

true;

}

This is what we have for when the user clicks on "Respond to Email"

Here is what we have in the web config file?

<

system.net>

<

mailSettings>

<

smtp>

<

network host="Server=whsql-v05.prod.mesa1.secureserver.net" port="25" defaultCredentials="false" userName="ourUserName" password="ourPassword" />

</

smtp>

</

mailSettings>

</

system.net>

I can?t see anything wrong anywhere. Do you see anything wrong with ur code?

I am open for any suggestions? I am at a loss at this point.. I just don;t know what else to check...

I am clearly calling my SMTP Client to send the email so what else can i do? ( Emails are not sent within the program when "Respond to Email" submit button is pushed...)

Thank you for your time.

ALICIA

ahari312
Asp.Net User
Re: Can someone help me with getting email to wotk within classified starter kit?3/29/2007 6:11:02 PM

0

I appreciate all of your help. I can see why you would think I want you to write my code for me but I assure you I do not. I am just a little green and I am having a very hard time articulating my exact problem.

I do however seem to have all of the correct code.

 

public

static bool SendAdInEmail(int adId, string senderName, string senderAddress, string recipientEmail, string subject, string message)

{

bool sent = false;

string from = String.Format("{0} <{1}>", senderName, senderAddress);

try

{

MailMessage m = new MailMessage(from, recipientEmail);

m.Subject = subject;

m.Body = message;

SmtpClient client = new SmtpClient();

client.Send(m);

sent =

true;

}

This seems to be the correct code for sending the Ad in an Email

 

string

from = String.Format("{0} <{1}>", senderName, senderAddress);

try

{

MailMessage m = new MailMessage(from, adUser.Email);

m.Subject =

"Response for Ad: " + ad.Title;

m.Body = sb.ToString();

SmtpClient client = new SmtpClient();

client.Send(m);

IncrementResponseCount(adId);

sent =

true;

}

This is what we have for when the user clicks on "Respond to Email"

Here is what we have in the web config file?

<

system.net>

<

mailSettings>

<

smtp>

<

network host="Server=whsql-v05.prod.mesa1.secureserver.net" port="25" defaultCredentials="false" userName="ourUserName" password="ourPassword" />

</

smtp>

</

mailSettings>

</

system.net>

I can?t see anything wrong anywhere. Do you see anything wrong with ur code?

I am open for any suggestions? I am at a loss at this point.. I just don;t know what else to check...

I am clearly calling my SMTP Client to send the email so what else can i do? ( Emails are not sent within the program when "Respond to Email" submit button is pushed...)

Thank you for your time.

ALICIA

ahari312
Asp.Net User
Re: Can someone help me with getting email to wotk within classified starter kit?3/29/2007 6:11:04 PM

0

I appreciate all of your help. I can see why you would think I want you to write my code for me but I assure you I do not. I am just a little green and I am having a very hard time articulating my exact problem.

I do however seem to have all of the correct code.

 

public

static bool SendAdInEmail(int adId, string senderName, string senderAddress, string recipientEmail, string subject, string message)

{

bool sent = false;

string from = String.Format("{0} <{1}>", senderName, senderAddress);

try

{

MailMessage m = new MailMessage(from, recipientEmail);

m.Subject = subject;

m.Body = message;

SmtpClient client = new SmtpClient();

client.Send(m);

sent =

true;

}

This seems to be the correct code for sending the Ad in an Email

 

string

from = String.Format("{0} <{1}>", senderName, senderAddress);

try

{

MailMessage m = new MailMessage(from, adUser.Email);

m.Subject =

"Response for Ad: " + ad.Title;

m.Body = sb.ToString();

SmtpClient client = new SmtpClient();

client.Send(m);

IncrementResponseCount(adId);

sent =

true;

}

This is what we have for when the user clicks on "Respond to Email"

Here is what we have in the web config file?

<

system.net>

<

mailSettings>

<

smtp>

<

network host="Server=whsql-v05.prod.mesa1.secureserver.net" port="25" defaultCredentials="false" userName="ourUserName" password="ourPassword" />

</

smtp>

</

mailSettings>

</

system.net>

I can?t see anything wrong anywhere. Do you see anything wrong with ur code?

I am open for any suggestions? I am at a loss at this point.. I just don;t know what else to check...

I am clearly calling my SMTP Client to send the email so what else can i do? ( Emails are not sent within the program when "Respond to Email" submit button is pushed...)

Thank you for your time.

ALICIA

ahari312
Asp.Net User
Re: Can someone help me with getting email to wotk within classified starter kit?3/29/2007 6:11:09 PM

0

I appreciate all of your help. I can see why you would think I want you to write my code for me but I assure you I do not. I am just a little green and I am having a very hard time articulating my exact problem.

I do however seem to have all of the correct code.

 

public

static bool SendAdInEmail(int adId, string senderName, string senderAddress, string recipientEmail, string subject, string message)

{

bool sent = false;

string from = String.Format("{0} <{1}>", senderName, senderAddress);

try

{

MailMessage m = new MailMessage(from, recipientEmail);

m.Subject = subject;

m.Body = message;

SmtpClient client = new SmtpClient();

client.Send(m);

sent =

true;

}

This seems to be the correct code for sending the Ad in an Email

 

string

from = String.Format("{0} <{1}>", senderName, senderAddress);

try

{

MailMessage m = new MailMessage(from, adUser.Email);

m.Subject =

"Response for Ad: " + ad.Title;

m.Body = sb.ToString();

SmtpClient client = new SmtpClient();

client.Send(m);

IncrementResponseCount(adId);

sent =

true;

}

This is what we have for when the user clicks on "Respond to Email"

Here is what we have in the web config file?

<

system.net>

<

mailSettings>

<

smtp>

<

network host="Server=whsql-v05.prod.mesa1.secureserver.net" port="25" defaultCredentials="false" userName="ourUserName" password="ourPassword" />

</

smtp>

</

mailSettings>

</

system.net>

I can?t see anything wrong anywhere. Do you see anything wrong with ur code?

I am open for any suggestions? I am at a loss at this point.. I just don;t know what else to check...

I am clearly calling my SMTP Client to send the email so what else can i do? ( Emails are not sent within the program when "Respond to Email" submit button is pushed...)

Thank you for your time.

ALICIA

ahari312
Asp.Net User
Re: Can someone help me with getting email to wotk within classified starter kit?3/29/2007 6:11:16 PM

0

I appreciate all of your help. I can see why you would think I want you to write my code for me but I assure you I do not. I am just a little green and I am having a very hard time articulating my exact problem.

I do however seem to have all of the correct code.

 

public

static bool SendAdInEmail(int adId, string senderName, string senderAddress, string recipientEmail, string subject, string message)

{

bool sent = false;

string from = String.Format("{0} <{1}>", senderName, senderAddress);

try

{

MailMessage m = new MailMessage(from, recipientEmail);

m.Subject = subject;

m.Body = message;

SmtpClient client = new SmtpClient();

client.Send(m);

sent =

true;

}

This seems to be the correct code for sending the Ad in an Email

 

string

from = String.Format("{0} <{1}>", senderName, senderAddress);

try

{

MailMessage m = new MailMessage(from, adUser.Email);

m.Subject =

"Response for Ad: " + ad.Title;

m.Body = sb.ToString();

SmtpClient client = new SmtpClient();

client.Send(m);

IncrementResponseCount(adId);

sent =

true;

}

This is what we have for when the user clicks on "Respond to Email"

Here is what we have in the web config file?

<

system.net>

<

mailSettings>

<

smtp>

<

network host="Server=whsql-v05.prod.mesa1.secureserver.net" port="25" defaultCredentials="false" userName="ourUserName" password="ourPassword" />

</

smtp>

</

mailSettings>

</

system.net>

I can?t see anything wrong anywhere. Do you see anything wrong with ur code?

I am open for any suggestions? I am at a loss at this point.. I just don;t know what else to check...

I am clearly calling my SMTP Client to send the email so what else can i do? ( Emails are not sent within the program when "Respond to Email" submit button is pushed...)

Thank you for your time.

ALICIA

ahari312
Asp.Net User
Re: Can someone help me with getting email to wotk within classified starter kit?3/29/2007 6:11:16 PM

0

I appreciate all of your help. I can see why you would think I want you to write my code for me but I assure you I do not. I am just a little green and I am having a very hard time articulating my exact problem.

I do however seem to have all of the correct code.

 

public

static bool SendAdInEmail(int adId, string senderName, string senderAddress, string recipientEmail, string subject, string message)

{

bool sent = false;

string from = String.Format("{0} <{1}>", senderName, senderAddress);

try

{

MailMessage m = new MailMessage(from, recipientEmail);

m.Subject = subject;

m.Body = message;

SmtpClient client = new SmtpClient();

client.Send(m);

sent =

true;

}

This seems to be the correct code for sending the Ad in an Email

 

string

from = String.Format("{0} <{1}>", senderName, senderAddress);

try

{

MailMessage m = new MailMessage(from, adUser.Email);

m.Subject =

"Response for Ad: " + ad.Title;

m.Body = sb.ToString();

SmtpClient client = new SmtpClient();

client.Send(m);

IncrementResponseCount(adId);

sent =

true;

}

This is what we have for when the user clicks on "Respond to Email"

Here is what we have in the web config file?

<

system.net>

<

mailSettings>

<

smtp>

<

network host="Server=whsql-v05.prod.mesa1.secureserver.net" port="25" defaultCredentials="false" userName="ourUserName" password="ourPassword" />

</

smtp>

</

mailSettings>

</

system.net>

I can?t see anything wrong anywhere. Do you see anything wrong with ur code?

I am open for any suggestions? I am at a loss at this point.. I just don;t know what else to check...

I am clearly calling my SMTP Client to send the email so what else can i do? ( Emails are not sent within the program when "Respond to Email" submit button is pushed...)

Thank you for your time.

ALICIA

ahari312
Asp.Net User
Re: Can someone help me with getting email to wotk within classified starter kit?3/29/2007 6:14:30 PM

0

Wow.. Sorry about the multiple posts. My computer hung up and when it recovered it had posted several times.

please forgive me.

alicia

35 Items, 2 Pages 1 2 |< << Go >> >|


Free Download:


Web:
Can someone help me with getting email to wotk within classified ... Can someone help me with getting email to wotk within classified starter kit? Last post 04-11-2007 1:07 PM by ahari312. 34 replies. Sort Posts: ...
TattooNOW : help please: Hi is there a site we can go to to get help in designing our own .... have seen some wotk that has come from this shop.great work. .... they basically bought a tattoo starter kit and opened a .... If you want send me a mail detailing what you are looking for and I will come up with something for you ...
View A great lifestyle for a couple wanting to wotk together and be on the water.. easy live ... We’ll list your advertisement to thousands of classified engines and ..... If you would like to see a picture - email me at [email protected] ... starter motor at the same time,can help to ship it to akl or wellington ...
Stop Me If You’ve Heard This One Before… | GM FastLane We’ll forgive a lot of rattles and a low grade interior if we can get 400hp, ..... also a problem but right now is not the right time to wotk at this front, ...... It was a car to help me attract my wife and it had a back seat to allow the ..... GM developed the first electric starter and lights, synchromesh and ...
From: [email protected] To: Hotrod_Digest_Users Apparently-To ... And yes - I do still get "mail undeliverable" messages but (as many of you ...... The jet kit I love, but to be honest I think I get a bit of knock if I ' bog' ...... the relay is a nuisance because it causes endless starter sessions to ...... Now my question: Can someone help me remember about how to set the sag ...













synchronize members table from 2 classified applications

one step forwards two back?

change the look

accent problem for other language than english

my classifieds is working form godaddy.com running sql2000

need help...problems with site working with godaddy.com

pictures not displayed after moving to hosting

multiple uploads on image upload page

how can i upload pdf's instead of images?

codebehind

combining advanced search page into default page.

no dropdownlist for location ?

plenty of css templates to choose for classified starterkit

check out my site and send me feedback! work great with ie but not with firefox.

changing colors

where do i put my mailaddress and mailmessage code to make my repond ad link work?

any object diagrams for classifieds project.

how to deploy on sql server 2005

error getting started please help!

error: cannot convert to type system.decimal

having a problem logging into the site? please help!

problems with whatisnew on search page

missing classifiedsdb_log.ldf

classified ad starter kit help

classified ad page not working

how to change the pages to more than 4 in search.aspx

what is the username and pasword for admin user?

advanced classified kit - a best option is here.

please help! - need to modify stored procedure insertad.

adsdatacomponenttableadapters

   
  Privacy | Contact Us
All Times Are GMT