Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 02-02-2012, 06:52 AM   #1 (permalink)
Registered Member
 
Join Date: Feb 2012
Posts: 5
rcheguraju is on a distinguished road
Unhappy Not able to send mail using SMTPSender for cbeyond

Hi All,
Am new to iPhone development as I am using SMTPSender for sending mails I am able to send mails using my gmail account but when i use my company account which comes under cbeyond am not able to send it is showing unable to connect to server.I used relay host as smtp.cbeyond.com.Please can anyone help me out.Thanks to all in Advance.


Regards,
RamyaRaj,
Delhi.
rcheguraju is offline   Reply With Quote
Old 02-02-2012, 07:01 PM   #2 (permalink)
Registered Member
 
Join Date: Aug 2009
Posts: 125
CAmaninacan is on a distinguished road
Default

Quote:
Originally Posted by rcheguraju View Post
Hi All,
Am new to iPhone development as I am using SMTPSender for sending mails I am able to send mails using my gmail account but when i use my company account which comes under cbeyond am not able to send it is showing unable to connect to server.I used relay host as smtp.cbeyond.com.Please can anyone help me out.Thanks to all in Advance.


Regards,
RamyaRaj,
Delhi.
Do you have this set to NO or YES?

testMsg.wantsSecure = NO;

Try them both and see what happens.
CAmaninacan is offline   Reply With Quote
Old 02-02-2012, 10:23 PM   #3 (permalink)
Registered Member
 
Join Date: Feb 2012
Posts: 5
rcheguraju is on a distinguished road
Unhappy

Quote:
Originally Posted by CAmaninacan View Post
Do you have this set to NO or YES?

testMsg.wantsSecure = NO;

Try them both and see what happens.
Hi CAmaninacan,

Thanks for your reply,
I tried for both Yes & No I am getting same result not able to connect to server.it is trying to connect with server with all the three ports (587,465,25) but it is not able to connect.

Thanks in advance.

Regards,
Ramya,
Delhi.
rcheguraju is offline   Reply With Quote
Old 02-05-2012, 11:11 AM   #4 (permalink)
Registered Member
 
Join Date: Aug 2009
Posts: 125
CAmaninacan is on a distinguished road
Default

Ok, do you mind posting the code you are using? Also, whats the last thing you see on the console log?
CAmaninacan is offline   Reply With Quote
Old 02-05-2012, 10:14 PM   #5 (permalink)
Registered Member
 
Join Date: Feb 2012
Posts: 5
rcheguraju is on a distinguished road
Default

Quote:
Originally Posted by CAmaninacan View Post
Ok, do you mind posting the code you are using? Also, whats the last thing you see on the console log?

This is the code am using when i click send button,I wrote this code in IBAction

SKPSMTPMessage *test_smtp_message = [[SKPSMTPMessage alloc] init];
test_smtp_message.fromEmail = FromTextField.text;
test_smtp_message.toEmail = ToTextField.text;
test_smtp_message.relayHost = subjectTextField.text;
test_smtp_message.requiresAuth = YES;
test_smtp_message.login = loginNameTextField.text;
test_smtp_message.pass = PasswordTextField.text;
test_smtp_message.wantsSecure = NO; // smtp.gmail.com doesn't work without TLS!
test_smtp_message.subject = @"HI this is adaequare";
// test_smtp_message.bccEmail = @"testbcc@test.com";

// Only do this for self-signed certs!
// test_smtp_message.validateSSLChain = NO;
test_smtp_message.delegate = self;

NSMutableArray *parts_to_send = [NSMutableArray array];

//If you are not sure how to format your message part, send an email to your self.
//In Mail.app, View > Message> Raw Source to see the raw text that a standard email client will generate.
//This should give you an idea of the proper format and options you need
NSDictionary *plain_text_part = [NSDictionary dictionaryWithObjectsAndKeys:
@"text/plain\r\n\tcharset=UTF-8;\r\n\tformat=flowed", kSKPSMTPPartContentTypeKey,
[bodyTextField.text stringByAppendingString:@"\n"], kSKPSMTPPartMessageKey,
@"quoted-printable", kSKPSMTPPartContentTransferEncodingKey,
nil];
[parts_to_send addObjectlain_text_part];
NSDictionary *sig_text_part = [NSDictionary dictionaryWithObjectsAndKeys:
@"text/plain\r\n\tcharset=UTF-8;\r\n\tformat=flowed", kSKPSMTPPartContentTypeKey,
[@"\n" stringByAppendingString:subjectTextField.text], kSKPSMTPPartMessageKey,
@"quoted-printable", kSKPSMTPPartContentTransferEncodingKey,
nil];
[parts_to_send addObject:sig_text_part];

test_smtp_message.parts = parts_to_send;
HighestState = 0;

NSLog(@"From : %@ \n To:%@ \n Login Name : %@ \n relay Host : %@ ",test_smtp_message.fromEmail,test_smtp_message.to Email,test_smtp_message.login,test_smtp_message.re layHost);

[test_smtp_message send];


This is the log
C: Attempting to connect to server at: smtp.cbeyond.com:587
C: Attempting to connect to server at: smtp.cbeyond.com:465
C: Attempting to connect to server at: smtp.cbeyond.com:25
delegate - error(-3): Unable to connect to the server.

I used relay host as smtp.cbeyond.com

It is working only with gmail even with my yahoo id it is failed

Can you help me regarding this.

While capturing input stream it is returning length as -1

len = [(NSInputStream *)stream read:buf maxLength:1024];

Thanks in advance.

Regards,
Ramya,
Delhi.
rcheguraju is offline   Reply With Quote
Old 02-06-2012, 06:43 AM   #6 (permalink)
Registered Member
 
Join Date: Feb 2012
Posts: 5
rcheguraju is on a distinguished road
Default

Quote:
Originally Posted by alicefrerichs View Post
whats the last thing you see on the console log
HI alicefrerichs,
Thanks for your reply.
Sorry for silly Question how can I See Console Output.
Only NSlog What I wrote they are only coming in Console of Xcode.So According to that my Console Output is like this


2012-02-07 10:25:39.109 SMTPSender[625:f803] C: Attempting to connect to server at: smtp.cbeyond.com:587
2012-02-07 10:25:40.175 SMTPSender[625:f803] Length of Input Stream : -1
2012-02-07 10:25:47.110 SMTPSender[625:f803] C: Attempting to connect to server at: smtp.cbeyond.com:465
2012-02-07 10:25:55.111 SMTPSender[625:f803] C: Attempting to connect to server at: smtp.cbeyond.com:25
2012-02-07 10:25:56.367 SMTPSender[625:f803] Length of Input Stream : -1
2012-02-07 10:26:03.115 SMTPSender[625:f803] delegate - error(-3): Unable to connect to the server.
2012-02-07 10:26:03.116 SMTPSender[625:f803] *** stopping watchdog ***

Last edited by rcheguraju; 02-06-2012 at 11:00 PM.
rcheguraju is offline   Reply With Quote
Old 02-13-2012, 01:17 AM   #7 (permalink)
Registered Member
 
Join Date: Feb 2012
Posts: 5
rcheguraju is on a distinguished road
Unhappy

Quote:
Originally Posted by rcheguraju View Post
HI alicefrerichs,
Thanks for your reply.
Sorry for silly Question how can I See Console Output.
Only NSlog What I wrote they are only coming in Console of Xcode.So According to that my Console Output is like this


2012-02-07 10:25:39.109 SMTPSender[625:f803] C: Attempting to connect to server at: smtp.cbeyond.com:587
2012-02-07 10:25:40.175 SMTPSender[625:f803] Length of Input Stream : -1
2012-02-07 10:25:47.110 SMTPSender[625:f803] C: Attempting to connect to server at: smtp.cbeyond.com:465
2012-02-07 10:25:55.111 SMTPSender[625:f803] C: Attempting to connect to server at: smtp.cbeyond.com:25
2012-02-07 10:25:56.367 SMTPSender[625:f803] Length of Input Stream : -1
2012-02-07 10:26:03.115 SMTPSender[625:f803] delegate - error(-3): Unable to connect to the server.
2012-02-07 10:26:03.116 SMTPSender[625:f803] *** stopping watchdog ***

Hi All,
Can anyone help me how to come out of this problem.Am able to send mail through gmail using SKSMTPMessage but not able to send using my company mail id which uses "cbeyond" Network.


Regards,
Ramya.C.R.
New Delhi.
rcheguraju is offline   Reply With Quote
Reply

Bookmarks

Tags
cbeyond, iphone, smtp, xcode4.2

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 413
16 members and 397 guests
Atatator, chiataytuday, dre, FrankWeller, imac74, ipodphone, jeroenkeij, kukat, LunarMoon, MAMN84, n00b, PowerGoofy, QuantumDoja, Retouchable, tim0504, VinceYuan
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,675
Threads: 94,124
Posts: 402,909
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Retouchable
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 06:04 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0